This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: C++ debugging progress
On Wed, Nov 28, 2001 at 01:36:28PM -0500, Daniel Berlin wrote:
> > Dwarf2 first:
> > <1><115>: Abbrev Number: 15 (DW_TAG_structure_type)
> > DW_AT_sibling : <1c2>
> > DW_AT_name : Bottom
> > DW_AT_byte_size : 24
> > DW_AT_decl_file : 1
> > DW_AT_decl_line : 4
> > DW_AT_containing_type: <22e>
> > <2><128>: Abbrev Number: 16 (DW_TAG_inheritance)
> > DW_AT_type : <22e>
> > DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0; )
> > DW_AT_accessibility: 1 (public)
> > <2><131>: Abbrev Number: 16 (DW_TAG_inheritance)
> > DW_AT_type : <2df>
> > DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8; )
> > DW_AT_accessibility: 1 (public)
> > <2><13a>: Abbrev Number: 3 (DW_TAG_member)
> > DW_AT_name : bbb
> > DW_AT_decl_file : 1
> > DW_AT_decl_line : 4
> > DW_AT_type : <cd>
> > DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16; )
> >
> > Do you see it? I don't, and I'm pretty sure it's not there.
>
> Umm, look at type 2df and 22e.
> I'm going to bet money xxx is there.
You owe me some money.
Both 22e and 2df are marked as inheriting from Base, which is <56> (I
included 22e in the original message). They contain:
<2><23f>: Abbrev Number: 22 (DW_TAG_inheritance)
DW_AT_type : <56>
DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8; )
DW_AT_virtuality : 1 (virtual)
DW_AT_accessibility: 1 (public)
That tells me where xxx would be, inside the <56> at offset +8, if my
object was of type 2df or 22e. It isn't, it's of type 115.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer