This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: <incomplete type>
Craig Jeffree <craig.jeffree@preston.net> writes:
> On Fri, 2005-08-26 at 12:02 -0700, Jim Blandy wrote:
>> 'readelf -wi' dumps Dwarf debugging info in a human-readable form.
>> You can apply it to relocatable object files, executables, and shared
>> libraries. You probably want to apply it to the executable or shared
>> library, since that's fewer steps removed from GDB, but the output
>> will be large. You'll need to search for a DW_TAG_structure debugging
>> information entry ("die") whose DW_AT_name attribute is the mangled
>> form of Soi::Waypoint, and verify that the members are indeed listed
>> there. If you could post that die when you find it, that might be
>> interesting.
>>
> I don't think I really understand what I'm looking at here. In the .o
> file I found this:
> <1><ee6b>: Abbrev Number: 113 (DW_TAG_structure_type)
> DW_AT_sibling : <f3d6>
> DW_AT_name : (indirect string, offset: 0xd7e3): Waypoint
> DW_AT_byte_size : 120
> DW_AT_decl_file : 62
> DW_AT_decl_line : 33
> DW_AT_containing_type: <1668a>
>
> and in the executable I found this:
> <2><3bb78>: Abbrev Number: 2 (DW_TAG_structure_type)
> DW_AT_sibling : <3bc2e>
> DW_AT_name : (indirect string, offset: 0x4ff824): Waypoint
> DW_AT_byte_size : 24
> DW_AT_decl_file : 123
> DW_AT_decl_line : 90
>
>
> Are these complete dies?
The leftmost number in <angle brackets> is the nesting level of that
die; so if the entry for the die after the first one you listed starts
with <2>, then it's a child of the <1> die. There should be
DW_TAG_member(?) dies.
(I'm apparently wrong about the DW_AT_name being mangled. Does the
DW_AT_containing_type attribute of the first die point at something
named "Soi"?)