This is the mail archive of the gdb-patches@sources.redhat.com 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]

[patch] Cleanup PUSH_ARGUMENTS


Hello,

The attached cleans up PUSH_ARGUMENTS a little.  It eliminates the 
definition found in valops.c moving it to gdbarch.  It also no longer 
requires this method at multi-arch level one. Finally it fixes a bug. 
Targets that don't define PUSH_ARGUMENTS get default_push_arguments().

This is the first of the fallout from Richard E's feedback.

Andrew
2002-02-10  Andrew Cagney  <ac131313@redhat.com>

	* valops.c (PUSH_ARGUMENTS): Delete definition.
	* gdbarch.sh (PUSH_ARGUMENTS): Don't require when multi-arch
	partial.  Default to default_push_arguments.
	* gdbarch.h, gdbarch.c: Regenerate.

Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.109
diff -u -r1.109 gdbarch.sh
--- gdbarch.sh	2002/02/10 02:47:12	1.109
+++ gdbarch.sh	2002/02/10 05:32:14
@@ -498,7 +498,7 @@
 #
 f:2:RETURN_VALUE_ON_STACK:int:return_value_on_stack:struct type *type:type:::generic_return_value_on_stack_not::0
 f:2:EXTRACT_RETURN_VALUE:void:extract_return_value:struct type *type, char *regbuf, char *valbuf:type, regbuf, valbuf::0:0
-f:1:PUSH_ARGUMENTS:CORE_ADDR:push_arguments:int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr:nargs, args, sp, struct_return, struct_addr::0:0
+f:2:PUSH_ARGUMENTS:CORE_ADDR:push_arguments:int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr:nargs, args, sp, struct_return, struct_addr::::default_push_arguments
 f:2:PUSH_DUMMY_FRAME:void:push_dummy_frame:void:-:::0
 F:1:PUSH_RETURN_ADDRESS:CORE_ADDR:push_return_address:CORE_ADDR pc, CORE_ADDR sp:pc, sp:::0
 f:2:POP_FRAME:void:pop_frame:void:-:::0
Index: valops.c
===================================================================
RCS file: /cvs/src/src/gdb/valops.c,v
retrieving revision 1.50
diff -u -r1.50 valops.c
--- valops.c	2002/02/04 02:14:46	1.50
+++ valops.c	2002/02/10 05:32:17
@@ -1078,10 +1078,6 @@
   return sp;
 }
 
-#ifndef PUSH_ARGUMENTS
-#define PUSH_ARGUMENTS default_push_arguments
-#endif
-
 CORE_ADDR
 default_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
 			int struct_return, CORE_ADDR struct_addr)

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