This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [c++] Pointer to member overhaul
- From: Jim Blandy <jimb at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 29 Dec 2006 11:06:21 -0800
- Subject: Re: [c++] Pointer to member overhaul
- References: <20061229025509.GA29152@nevyn.them.org>
This is great! I think TYPE_CODE_MEMBERPTR and TYPE_CODE_METHODPTR
are definitely the right approach; data members and member functions
are not merely a different kind of pointer target in the sense that,
say, functions are.
Since the change is so large, I just looked at the changes to the
cp-abi.h and gdbtypes.h interfaces, which I'm assuming pretty much
drive the rest of the stuff.
The comments in cp-abi.h refer to 'cplus_method_ptr_to_target', which
isn't defined anywhere.
The sentence "CONTENTS is the bytes forming the pointer to method"
isn't grammatical.
What is the use of TYPE_CODE_METHOD now? Is it equivalent to
TYPE_CODE_FUNC, except that it expects a 'this' pointer?
Is the representation of a pointer to a data member always simply an
offset from the start of the member pointer's class? It would be nice
if the comment for TYPE_CODE_MEMBERPTR said this; similarly, it would
be nice if the comment for TYPE_CODE_METHODPTR explained that the
representation varies from one ABI to the next, and one should use the
cp-abi.h methods to work with them. Say the word, and I'll write
these for you.
Why are vtable_function_descriptors and vbit_in_delta gdbarch methods
instead of cp-abi.h methods?