This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Debug info for 'complex' types
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Jeffrey Law <law at redhat dot com>, George Helffrich <george at gly dot bris dot ac dot uk>,gcc-bugs at gcc dot gnu dot org
- Cc: gdb at sources dot redhat dot com
- Date: Wed, 30 Jan 2002 23:25:58 -0500
- Subject: Debug info for 'complex' types
While otherwise fixing complex value support in GDB, I came across this
patch:
Sun Jul 23 11:52:03 2000 George Helffrich (george@gly.bris.ac.uk)
* dbxout.c (dbxout_type, case COMPLEX_TYPE): Fix length field in stab.
It's wrong - the GDB stabs reader says:
/* If n3 is zero and n2 is positive, we want a floating type, and n2
is the width in bytes.
Fortran programs appear to use this for complex types also. To
distinguish between floats and complex, g77 (and others?) seem
to use self-subranges for the complexes, and subranges of int for
the floats.
Also note that for complexes, g77 sets n2 to the size of one of
the member floats, not the whole complex beast. My guess is that
this was to work well with pre-COMPLEX versions of gdb. */
This was true as late as 2.95.3, and broken by this patch. Can it be
reverted for 3.0.4 and 3.1, please? There's no way for GDB to tell if this
change is present or not in any reasonable fashion, so there is no way to
support it.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer