This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Handling of c++ function members
On Tue, Sep 27, 2011 at 10:59 AM, Joost van der Sluis <joost@cnoc.nl> wrote:
>> What I understood is, that DW_AT_vtable_elem_location should contain a
>> Dwarf-block that calculates the location of a pointer in which the
>> location of the function member is stored.
Your final conclusion is right - I thought the workaround was
contained to the dwarf reader, but maybe not.
Are you actually passing through gnu-v2-abi.c? Everythong ought to be
on the v3 abi unless this is another FPC quirk...
>> And there are two thing's I'm not sure about: gcc stores
>> DW_AT_containing_type in the debug-info, with the 'parent' entry of the
>> DW_TAG_subprogram entry. To me it looks that this is duplicated
>> information, and not specified in the Dwarf-specs. Secondly I do not
>> understand where the DW_AT_object_pointer is used for?
>
> DW_AT_containing_type is placed into NFN's Context field by dwarf2read.
The use of DW_AT_containing_type by GCC is non-standard, yes.
DW_AT_object_pointer is supposed to be used to identify "this"
explicitly, I think, but it's been a while. Without it, you can't
100% differentiate "int x()" from "static int x(X *this)" in the
debugger. Fortunately we get it right in practice.
--
Thanks,
Daniel