This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [V2 PATCH 0/5] Handle first hidden parameter
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: yao at codesourcery dot com
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 28 May 2012 22:31:23 +0200 (CEST)
- Subject: Re: [V2 PATCH 0/5] Handle first hidden parameter
- References: <1337777814-7459-1-git-send-email-yao@codesourcery.com>
> From: Yao Qi <yao@codesourcery.com>
> Date: Wed, 23 May 2012 20:56:49 +0800
>
> Hi,
> This patch series is the version 2, and version 1 can be found here,
>
> [PATCH 1/4] New gdb arch hook: return_with_first_hidden_param_p
> http://sourceware.org/ml/gdb-patches/2012-04/msg00565.html
>
> The version 1 was approved by Tom, but Mark K. thinks "first hidden
> parameter" is special in language c++ on some arch, instead of
> all languages.
That's not quite what I said. I said it was specific to the C++ ABI
implemented by GCC. Which is why I suggested calling the new gdbarch
hook from gnu-v3-abi.c.
> http://sourceware.org/ml/gdb-patches/2012-05/msg00671.html
>
> I re-design this patch a little bit. In version 2, the "first
> hidden parameter" is treated as a special feature of a combination
> of a certain language and a certain arch. I add new language
> hook 'la_return_by_reference', which is equal to
> 'la_pass_by_reference' in default, and I overwrite the default
> in language c++ to honour gdbarch_return_in_first_hidden_param.
> In this way, we can reduce the impact of this change on a certain
> arch in c++ only.
Sorry, but in my opinion this makes things more complicated for no
apparent reason.