This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: dwarfread / multiple compilation units


On Fri, Jul 25, 2003 at 09:35:22PM +0100, daniel.van.gerpen@philips.com wrote:
> Hi,
> 
> I stumbled onto several problems using the Gnu Debugger 5.3 with code
> from the Diab Compiler 4.4b.
> 
> One problem is the following:
> 
> The compiler option -Xsplit-section creates a separate section for each
> function to allow the linker to remove it during linking when it is not
> used. The option also splits the debug information for types into
> different compilation units:


> In dwarfread.c the function lookup_utype() now complains about a bad die
> reference, because read_ofile_symtab() only reads the dies from one
> compilation unit (unit B). The result is that gdb only shows the variable
> "foo" to be of type "int" instead of type "Cfoo".
> 
> Maybe someone already has a patch for this?
> 
> If not, what would be an appropriate solution? I have been pondering about 
> a
> possible fix. To read all dies from all compilation units could be a 
> problem
> for code with a huge amount of debug information.
> 
> A better way would be to reload the missing information when it is needed.
> But I am not sure how to load dies from other compilation units for 
> example
> in lookup_utype().

This will be extremely hard to fix.

The DWARF-2 reader has the same problem, and I or someone else will see
that it gets fixed.  But it is unlikely that any of the maintainers
will put in that much effort for the DWARF 1 reader.

Really, kick your compiler vendor.  DWARF 2 is a good number of years
old now.  They should switch.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]