This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/4] New gdb arch hook: return_with_first_hidden_param_p


> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]