This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/4] New gdb arch hook: return_with_first_hidden_param_p
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: tromey at redhat dot com
- Cc: yao at codesourcery dot com, gdb-patches at sourceware dot org, cltang at codesourcery dot com
- Date: Thu, 17 May 2012 01:03:19 +0200 (CEST)
- Subject: Re: [PATCH 1/4] New gdb arch hook: return_with_first_hidden_param_p
- References: <1334755073-26528-1-git-send-email-yao@codesourcery.com> <87zk97n8ve.fsf@fleche.redhat.com>
> From: Tom Tromey <tromey@redhat.com>
> Date: Wed, 16 May 2012 14:55:49 -0600
>
> >>>>> "Yao" == Yao Qi <yao@codesourcery.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
> Yao> gcc/function.c:assign_parms_augmented_arg_list():
>
> 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> +int
> 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.
>
> Over-long lines.
>
> Ok with those fixes.
If this hasn't been committed yet, please wait.