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] Allow struct 'return' on 32-bit sparc.


> Date: Mon, 04 Feb 2013 20:02:54 -0500 (EST)
> From: David Miller <davem@davemloft.net>
> 
> From: Mark Kettenis <mark.kettenis@xs4all.nl>
> Date: Tue, 5 Feb 2013 00:57:15 +0100 (CET)
> 
> > The sparc-tdep.c bits are correct as far as I can see.
> > 
> > I think it would be better if your new function would still have
> > "struct_return" in its name.  My suggestion would be
> > "struct_return_convention".
> > 
> > Also,
>  ...
> > Return RETURN_VALUE_REGISTER_CONVENTION if there is nothing to return
> > seems to be a bit odd.  But since convention_for_return() is never
> > called with code being TYPE_CODE (there is an explicit check for that
> > in stack.c:return_command()) you could simply leave the check in
> > using_struct_return().
> 
> Agreed on all counts, thanks for the feedback.
> 
> Here is the updated patch:
> 
> gdb/
> 
> 	* sparc-tdep.c (sparc32_return_value): Handle writing return value when
> 	using RETURN_VALUE_ABI_PRESERVES_ADDRESS.
> 	* value.c (struct_return_convention): New function.
> 	(using_struct_return): Implement in terms of struct_return_convention.
> 	* value.h (struct_return_convention): Declare.
> 	* stack.c (return_command): Allow successful overriding of the return
> 	value when RETURN_VALUE_ABI_PRESERVES_ADDRESS.

Thanks, that looks good to me.  Perhaps wait a day or two to give
other people a chance to comment on the stack.c/value.c changes.

Mark


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