* dwarf2 & DW_FORM_ref_addr
@ 2003-03-28 3:21 Stanley Gambarin
2003-03-28 5:08 ` Kevin Buettner
2003-03-28 14:33 ` Daniel Jacobowitz
0 siblings, 2 replies; 4+ messages in thread
From: Stanley Gambarin @ 2003-03-28 3:21 UTC (permalink / raw)
To: gdb
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: dwarf2 & DW_FORM_ref_addr
2003-03-28 3:21 dwarf2 & DW_FORM_ref_addr Stanley Gambarin
@ 2003-03-28 5:08 ` Kevin Buettner
2003-03-30 19:53 ` Daniel Berlin
2003-03-28 14:33 ` Daniel Jacobowitz
1 sibling, 1 reply; 4+ messages in thread
From: Kevin Buettner @ 2003-03-28 5:08 UTC (permalink / raw)
To: Stanley Gambarin, gdb
On Mar 27, 7:21pm, Stanley Gambarin wrote:
> I guess that GCC is not generating it, but I wonder
> if GDB should support it ?
Definitely.
Kevin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: dwarf2 & DW_FORM_ref_addr
2003-03-28 3:21 dwarf2 & DW_FORM_ref_addr Stanley Gambarin
2003-03-28 5:08 ` Kevin Buettner
@ 2003-03-28 14:33 ` Daniel Jacobowitz
1 sibling, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2003-03-28 14:33 UTC (permalink / raw)
To: Stanley Gambarin; +Cc: gdb
On Thu, Mar 27, 2003 at 07:21:24PM -0800, Stanley Gambarin wrote:
> 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 ?
It should support it and doesn't currently. It's come up a couple
times if you search the list archives.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: dwarf2 & DW_FORM_ref_addr
2003-03-28 5:08 ` Kevin Buettner
@ 2003-03-30 19:53 ` Daniel Berlin
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Berlin @ 2003-03-30 19:53 UTC (permalink / raw)
To: Kevin Buettner; +Cc: Stanley Gambarin, gdb
On Friday, March 28, 2003, at 12:08 AM, Kevin Buettner wrote:
> On Mar 27, 7:21pm, Stanley Gambarin wrote:
>
>> I guess that GCC is not generating it, but I wonder
>> if GDB should support it ?
>
> Definitely.
>
Particularly because the reason GCC doesn't generate it is *because*
gdb doesn't support it.
> Kevin
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-03-30 19:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-28 3:21 dwarf2 & DW_FORM_ref_addr Stanley Gambarin
2003-03-28 5:08 ` Kevin Buettner
2003-03-30 19:53 ` Daniel Berlin
2003-03-28 14:33 ` Daniel Jacobowitz
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).