This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: debug/1621: Debugging with complex numbers
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