C++ debugging progress

Jason Merrill jason@redhat.com
Thu Nov 22 12:08:00 GMT 2001


>>>>> "Jason" == Jason Merrill <jason@redhat.com> writes:

> Yep.  Since Base is a virtual base of Left, the DW_AT_data_member_location
> here should be a complex expression telling the debugger to go through the
> vtable.  I'll get on it.

> I'll also change the stabs output to give the offset within the vtable
> rather than the offset of the base in a complete object; gdb will still
> need to be clever enough to know what to do with it.

Please give this a spin; gdb doesn't like it, but I think it's correct.
Note that the offset given in the stabs output should be treated as
negative, so for V3 objects,

  BaseAddr = LeftAddr + *((*LeftAddr) - Offset)

The dwarf2 output is the above encoded in reverse Polish notation.  I
suppose we could rely on gdb to know the equation for dwarf, too, but that
would be nonconforming and only saves four bytes.

2001-11-28  Jason Merrill  <jason@redhat.com>

	* dwarf2out.c (add_data_member_location_attribute): Do the
	right thing for virtual bases.
	* dbxout.c (dbxout_type): For a virtual base, print the offset
	within the vtable.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/x-patch
Size: 4161 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20011122/86b66860/attachment.bin>


More information about the Libstdc++ mailing list