debug/1621: Debugging with complex numbers

Daniel Jacobowitz drow@mvista.com
Wed Dec 11 17:26:00 GMT 2002


The following reply was made to PR debug/1621; it has been noted by GNATS.

From: Daniel Jacobowitz <drow@mvista.com>
To: Jim Wilson <wilson@redhat.com>
Cc: Wolfgang Bangerth <bangerth@ticam.utexas.edu>,
	"Joseph S. Myers" <jsm28@cam.ac.uk>, bangerth@dealii.org,
	gcc-bugs@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Subject: Re: debug/1621: Debugging with complex numbers
Date: Wed, 11 Dec 2002 20:22:45 -0500

 On Wed, Dec 11, 2002 at 07:05:47PM -0500, Jim Wilson wrote:
 > About the $imag, $real stuff in the gcc/doc/extend.texi file...
 > The part about "None of the supported debug info formats..." is obsolete.
 > DWARF2 location descriptions can handle this easily, and this is already
 > supported in dwarf2out.c.  Perhaps also DWARF, but I don't care enough to look
 > it up.  The stabs hack of emitting two foo$imag and foo$real symbols is ugly
 > and should be discouraged.  I don't think it makes any sense to teach gdb
 > about this hack.  We should instead encourage use of DWARF2, which we are
 > already doing.
 
 I agree.
 
 > I tried writing a patch to make gcc use the Solaris 'R' stab letter extension.
 > 
 > This brings up a number of questions.  Sun only defined 3 float and 3 complex
 > float types.  However, we have 7 float types and 6 complex float types.  (They
 > should be the same, but that is a different problem.)  Do we extend the
 > Solaris extension to meet our needs?  Or fall back on the problematic 'r'
 > letter when we can't use 'R'?  Extending 'R' might make us incompatible with
 > Sun if in the future Sun extends it too, so trying to discuss it with Sun is
 > a good idea.  Or perhaps invent our own similar extension that won't conflict
 > with Sun?
 
 First of all, for floating point types we could just continue to use
 'r'.  It's not problematic in that case.  On the other hand consistency
 is nice.
 
 I recommend emitting just the generic NF_COMPLEX and NF_FLOATING (?)
 for any of the unknown types.  GDB only uses the type to determine if
 it is a floating or complex type, so that will suffice.
 
 -- 
 Daniel Jacobowitz
 MontaVista Software                         Debian GNU/Linux Developer



More information about the Gcc-prs mailing list