This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Handling of c++ function members


On Tue, 2011-09-27 at 16:59 +0200, Joost van der Sluis wrote:
> On Mon, 2011-09-26 at 23:00 +0200, Joost van der Sluis wrote:
> > On Mon, 2011-09-26 at 16:38 -0400, Daniel Jacobowitz wrote:
> > > On Mon, Sep 26, 2011 at 12:46 PM, Joost van der Sluis <joost@cnoc.nl> wrote:
> > > 
> > > Can you be a little more specific, maybe an example?
> > > 
> 
> > 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.

> > But it seems to me that gcc stores the index of the function member
> > within some vtable in DW_AT_vtable_elem_location, instead of the memory
> > address itself. In gnu-v2-abi.c there is some code that 'knows' how this
> > vtable is organized so it is able to calculate the location of the
> > method-pointer.

Never mind. I've found a comment in dwarf2read explaining that older gcc
versions are indeed using indexes, while 'everything else' doesn't. So I
wrote a patch for the Free Pascal Compiler so that it does what
'everything else' does...

Regards,

Joost van der Sluis.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]