This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: RFA: gdbarchify RETURN_VALUE_ON_STACK
- To: Jim Blandy <jimb at cygnus dot com>
- Subject: Re: RFA: gdbarchify RETURN_VALUE_ON_STACK
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Wed, 19 Apr 2000 10:40:07 +1000
- CC: gdb-patches at sourceware dot cygnus dot com
- Organization: Cygnus Solutions
- References: <200004182327.SAA10393@zwingli.cygnus.com>
Jim Blandy wrote:
>
> I did this one just like IEEE_FLOAT, so if that one was screwed up,
> this one is too.
You didn't.
> 2000-04-17 Jim Blandy <jimb@redhat.com>
>
> Bring RETURN_VALUE_ON_STACK under gdbarch's control.
> * gdbarch.sh (RETURN_VALUE_ON_STACK): New entry.
> * gdbarch.c, gdbarch.h: Regenerated.
> * arch-utils.c (default_return_value_on_stack): New function.
> * arch-utils.h (default_return_value_on_stack): New declaration.
I'd suggest the function name ``generic_return_value_on_stack_not'' (I
know the name grates) declared as:
extern gdbarch_return_value_on_stack_ftype ...;
For the arch line, I'd suggest the change:
- f:2:RETURN_VALUE_ON_STACK:int:return_value_on_stack:struct type
*type:type:::default_return_value_on_stack
+ f:2:RETURN_VALUE_ON_STACK:int:return_value_on_stack:struct type
*type:type:::default_return_value_on_stack:0
(I think I've set valid_p=0). The generated gdbarch.[hc] will then
always provide a default. That in turn allowing the #ifndef
RETURN_VALUE_ON_STACK in values.c to be deleted. Have a look at
REGISTER_NAME.
After that its ok,
(Thanks for fixing these!)
Andrew