dwarf2 & DW_FORM_ref_addr
Stanley Gambarin
stanleyg76@yahoo.com
Fri Mar 28 03:21:00 GMT 2003
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
More information about the Gdb
mailing list