This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH 1/4] New gdb arch hook: return_with_first_hidden_param_p
- From: Tom Tromey <tromey at redhat dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: <gdb-patches at sourceware dot org>, <cltang at codesourcery dot com>
- Date: Wed, 16 May 2012 14:55:49 -0600
- Subject: Re: [PATCH 1/4] New gdb arch hook: return_with_first_hidden_param_p
- References: <firstname.lastname@example.org>
>>>>> "Yao" == Yao Qi <email@example.com> writes:
Yao> Hi, this patch series is about fixing return values in C++ in GDB inf-call.
Thanks. I read through the whole thread and dug into the code a bit as
well. I think your approach is fine.
Yao> Unfortunately, GCC is not correct here. currently GCC processes
Yao> the return value RTL expanding like this, in
I suppose it would be nice to get some commitment on the GCC side to
declare this a non-bug, and part of the ABI.
Yao> +default_return_with_first_hidden_param_p (struct gdbarch *gdbarch,
Yao> + struct type *type)
This could use an introductory comment, just explaining it is an
implementation suitable for use by such-and-such gdbarch method.
Yao> +# Return true if the return value of function is stored in the first hidden parameter.
Yao> +# In theory, this feature should be language-dependent, specified by language and its ABI,
Yao> +# such as C++. Unfortunately, compiler may implement it to a target-dependent feature.
Yao> +# So that we need such hook here to be aware of this in GDB.
Ok with those fixes.