public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Stanley Gambarin <stanleyg76@yahoo.com>
To: gdb@sources.redhat.com
Subject: dwarf2 & DW_FORM_ref_addr
Date: Fri, 28 Mar 2003 03:21:00 -0000	[thread overview]
Message-ID: <20030328032124.20167.qmail@web14202.mail.yahoo.com> (raw)

Hello,
  i'm working with the compiler that makes use
of DW_FORM_ref_addr to generate 'type' attributes
(DW_AT_type) that span multiple dwarf2 compilation
units within a single source file (multiple 
compilation units are produced for template
functions and are eliminated by linker via
.gnu.linkonce sections).  When trying to debug 
executable with GDB, i get the following message:

Dwarf Error: Cannot find referent at offset 3716.

Digging into it a bit further, I find that dies 
are stored in the die_ref_table (hash) for each
dwarf2 compilation unit.  At the beginning of 
read_comp_unit() there is a call to clear the
hash table, so that later lookup for my type
in die_type() function will fail !!!  According to
dwarf2 spec (page 69 of 2.0.0 revision):
...
The second type of reference is the address of any
debugging information entry within the same executable
or shared object; it may refer to an entry in a 
different compilation unit from the unit containing
the reference.  This type of reference 
(DW_FORM_ref_addr) ...

I guess that GCC is not generating it, but I wonder
if GDB should support it ?

-- stanley


__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

             reply	other threads:[~2003-03-28  3:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-28  3:21 Stanley Gambarin [this message]
2003-03-28  5:08 ` Kevin Buettner
2003-03-30 19:53   ` Daniel Berlin
2003-03-28 14:33 ` Daniel Jacobowitz

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=20030328032124.20167.qmail@web14202.mail.yahoo.com \
    --to=stanleyg76@yahoo.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).