This is the mail archive of the
mailing list for the GCC project.
Re: [RFA/PATCH]: H8/300 - Update the generated debug information
- From: Jim Wilson <wilson at tuliptree dot org>
- To: Shrinivas Atre <ShrinivasA at kpit dot com>, gcc-patches at gcc dot gnu dot org, gdb-patches at gcc dot gnu dot org
- Date: Tue, 25 Feb 2003 23:23:06 -0500
- Subject: Re: [RFA/PATCH]: H8/300 - Update the generated debug information
- References: <69595093233BB547BB70CF5E492B63F2DA6751@sohm.kpit.com>
While generating COFF debug information for "int" type, the compiler
simply inserts type "T_INT" for this.
This doesn't say if the "int" is 32 bit or 16 bit.
The SDB/coff debug format is old, limited, and unextensible. It is
almost always wrong to use it. Since you are using gdb, a better
solution is to use stabs which doesn't have this problem.
Or, alternatively, if you must fix the SDB/coff debug info, I suggest
doing the same thing Andrew Cagney suggested. Make gcc emit a special
directive (.int32) and/or pass an option to gas. Have gas set an ELF
section header flag when it sees the directive or the option. Then
modify gdb to set the int size appropriately depending on the ELF
section header flags.
* gcc/sdbout.c (plain_type_1): Update COFF debug output information.
Output "short int" if integer size is 16 bit.
This isn't OK. It is wrong to emit a type of "short int" for an "int"
even if they are the same size, because they aren't the same type. This
will break the gdb testsuite.