From: Daniel Jacobowitz <drow@false.org>
To: Jim Blandy <jimb@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [c++] Pointer to member overhaul
Date: Sun, 31 Dec 2006 22:40:00 -0000 [thread overview]
Message-ID: <20061231224043.GA28190@nevyn.them.org> (raw)
In-Reply-To: <m3hcveo72q.fsf@codesourcery.com>
Thanks for looking over it.
On Fri, Dec 29, 2006 at 11:06:21AM -0800, Jim Blandy wrote:
> The comments in cp-abi.h refer to 'cplus_method_ptr_to_target', which
> isn't defined anywhere.
Fixed, thanks.
> The sentence "CONTENTS is the bytes forming the pointer to method"
> isn't grammatical.
Actually I disagree. CONTENTS is a singular noun here, the pointer
whose name is "contents".
> What is the use of TYPE_CODE_METHOD now? Is it equivalent to
> TYPE_CODE_FUNC, except that it expects a 'this' pointer?
It's basically the same as TYPE_CODE_FUNC. I eliminated a number of
cases which treated them differently. dwarf2read uses the distinction
to figure out what's a member pointer, but it could check for
TYPE_CODE_FUNC too. There's some bits in infcall mostly dealing with
argument promotion. It looks like it would be possible to remove
TYPE_CODE_METHOD now - it wouldn't be hard, just require careful
attention to detail.
> 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.
The only supported representation for TYPE_CODE_MEMBERPTR is the GNU v3
one, which is an offset and -1 for NULL. It varies by compiler, but I
did not add support for any other representation, since the only thing
already present was aCC and that support is on its way out. I added
some words.
> Why are vtable_function_descriptors and vbit_in_delta gdbarch methods
> instead of cp-abi.h methods?
Because they don't depend on the ABI, they depend on the architecture.
Itanium sets vtable_function_descriptors but PowerPC64 doesn't. ARM
and MIPS set vbit_in_delta since they need the low bit (for Thumb /
MIPS16).
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2006-12-31 22:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-29 2:55 Daniel Jacobowitz
2006-12-29 19:06 ` Jim Blandy
2006-12-31 22:40 ` Daniel Jacobowitz [this message]
2006-12-31 22:55 ` Eli Zaretskii
2006-12-31 23:49 ` Daniel Jacobowitz
2007-01-03 18:15 ` Daniel Jacobowitz
2007-01-08 15:47 ` Ulrich Weigand
2007-01-08 15:52 ` Daniel Jacobowitz
2007-01-08 16:02 ` Ulrich Weigand
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=20061231224043.GA28190@nevyn.them.org \
--to=drow@false.org \
--cc=gdb-patches@sourceware.org \
--cc=jimb@codesourcery.com \
/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