From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Merrill To: libstdc++@gcc.gnu.org Cc: gdb@sources.redhat.com Subject: Re: C++ debugging progress Date: Wed, 28 Nov 2001 13:03:00 -0000 Message-ID: References: <20011128020256.A9688@nevyn.them.org> <20011128124118.A23447@nevyn.them.org> X-SW-Source: 2001-11/msg00324.html Message-ID: <20011128130300.O5RrG6qJCv-Jx4NJ2bvDZTlOyOiUlz_T3ZJ_2_WmW3c@z> >>>>> "Jason" == Jason Merrill 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 * 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.