public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Joost van der Sluis <joost@cnoc.nl>
Cc: gdb@sourceware.org
Subject: Re: Handling of c++ function members
Date: Fri, 30 Sep 2011 14:42:00 -0000	[thread overview]
Message-ID: <CAN9gPaHjTjxDZ+zhMZ3zR0-jb_Xaeh7VH1EQHRewUaELnPfQGw@mail.gmail.com> (raw)
In-Reply-To: <1317135598.27942.29.camel@feddie.cnoc.lan>

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

  parent reply	other threads:[~2011-09-30 14:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-26 16:46 Joost van der Sluis
2011-09-26 20:38 ` Daniel Jacobowitz
2011-09-26 21:01   ` Joost van der Sluis
2011-09-27 15:05     ` Joost van der Sluis
2011-09-27 16:01       ` Joost van der Sluis
2011-09-30 14:42       ` Daniel Jacobowitz [this message]
2011-09-30 15:53         ` Joost van der Sluis
2011-09-30 18:50           ` Jan Kratochvil
2011-09-30 20:37             ` Joost van der Sluis
2011-10-02 13:51         ` Joost van der Sluis
2011-10-05 18:56           ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAN9gPaHjTjxDZ+zhMZ3zR0-jb_Xaeh7VH1EQHRewUaELnPfQGw@mail.gmail.com \
    --to=drow@false.org \
    --cc=gdb@sourceware.org \
    --cc=joost@cnoc.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).