This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC v2 01/38] add "this" pointers to more target APIs
- From: Doug Evans <dje at google dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches <gdb-patches at sourceware dot org>
- Date: Fri, 7 Feb 2014 21:19:32 -0800
- Subject: Re: [RFC v2 01/38] add "this" pointers to more target APIs
- Authentication-results: sourceware.org; auth=none
- References: <1391720136-2121-1-git-send-email-tromey at redhat dot com> <1391720136-2121-2-git-send-email-tromey at redhat dot com>
On Thu, Feb 6, 2014 at 12:54 PM, Tom Tromey <tromey@redhat.com> wrote:
> A subsequent pass introduces delegation helper functions to the target
> API. This delegation is much cleaner if the target_ops pointer is
> directly available at delegation time.
>
> This patch adds the "this" pointer to various to_* methods for this
> purpose.
>
> This updates a number of ports which I am unable to test. Please give
> them a look-over. Any possible problem here is trivial, though, as
> all that is required is adding an argument to a function.
Hi.
I'm *not* suggesting wholesale changes (babysteps is totally fine with
me), but there's something I'm not sure about.
I think it was on IRC where there was a discussion of passing the
(pseudo-)vtable pointer as the self/this parameter being less
preferable to passing a more canonical self/this which in turn has the
(pseudo-)vtable pointer. In this case we might not need such a change
until such time as we've already converted to C++ (and thus taking the
next step now could be time best spent elsewhere). My question is to
ask for clarity on where you see the target API headed. Will we need
a more canonical self/this pointer soon(-ish)?