Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: daniel.van.gerpen@philips.com
Cc: gdb@sources.redhat.com
Subject: Re: dwarfread / multiple compilation units
Date: Fri, 25 Jul 2003 23:08:00 -0000	[thread overview]
Message-ID: <20030725230816.GA21679@nevyn.them.org> (raw)
In-Reply-To: <OF3315700C.141D20E4-ONC1256D6E.0070E01C-41256D6E.00767415@diamond.philips.com>

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


      reply	other threads:[~2003-07-25 23:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-25 22:42 daniel.van.gerpen
2003-07-25 23:08 ` Daniel Jacobowitz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030725230816.GA21679@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=daniel.van.gerpen@philips.com \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox