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] Multi-arch i386 function argument handling


And another one.

Committed.

Mark

Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* config/i386/tm-i386.h (PUSH_ARGUMENTS, STORE_STRUCT_RETURN,
	DEPRECATED_EXTRACT_RETURN_VALUE, STORE_RETURN_VALUE,
	DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS, PUSH_DUMMY_FRAME,
	POP_FRAME): Remove defines.
	(i386_push_arguments, i386_store_struct_return,
	i386_extract_return_value, i386_store_return_value,
	i386_extract_struct_value_address, i386_push_dummy_frame,
	i386_pop_frame): Renove prototypes.
	* i386-tdep.c (i386_gdbarch_init): Adjust for removal of the
	macros mentioned above.

Index: i386-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-tdep.c,v
retrieving revision 1.62
diff -u -p -r1.62 i386-tdep.c
--- i386-tdep.c 15 Jun 2002 20:41:51 -0000 1.62
+++ i386-tdep.c 15 Jun 2002 21:12:30 -0000
@@ -1417,6 +1417,15 @@ i386_gdbarch_init (struct gdbarch_info i
 
   set_gdbarch_pc_in_call_dummy (gdbarch, pc_in_call_dummy_on_stack);
 
+  set_gdbarch_deprecated_extract_return_value (gdbarch,
+					       i386_extract_return_value);
+  set_gdbarch_push_arguments (gdbarch, i386_push_arguments);
+  set_gdbarch_push_dummy_frame (gdbarch, i386_push_dummy_frame);
+  set_gdbarch_pop_frame (gdbarch, i386_pop_frame);
+  set_gdbarch_store_struct_return (gdbarch, i386_store_struct_return);
+  set_gdbarch_store_return_value (gdbarch, i386_store_return_value);
+  set_gdbarch_deprecated_extract_struct_value_address (gdbarch,
+					    i386_extract_struct_value_address);
   set_gdbarch_use_struct_convention (gdbarch, i386_use_struct_convention);
 
   set_gdbarch_frame_init_saved_regs (gdbarch, i386_frame_init_saved_regs);
Index: config/i386/tm-i386.h
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/tm-i386.h,v
retrieving revision 1.38
diff -u -p -r1.38 tm-i386.h
--- config/i386/tm-i386.h 15 Jun 2002 20:41:51 -0000 1.38
+++ config/i386/tm-i386.h 15 Jun 2002 21:12:30 -0000
@@ -65,62 +65,12 @@ extern void i387_float_info (void);
 #define FLOAT_INFO { i387_float_info (); }
 
 
-#define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \
-  i386_push_arguments ((nargs), (args), (sp), (struct_return), (struct_addr))
-extern CORE_ADDR i386_push_arguments (int nargs, struct value **args,
-				      CORE_ADDR sp, int struct_return,
-				      CORE_ADDR struct_addr);
-
-/* Store the address of the place in which to copy the structure the
-   subroutine will return.  This is called from call_function.  */
-
-#define STORE_STRUCT_RETURN(addr, sp) \
-  i386_store_struct_return ((addr), (sp))
-extern void i386_store_struct_return (CORE_ADDR addr, CORE_ADDR sp);
-
-/* Extract from an array REGBUF containing the (raw) register state
-   a function return value of type TYPE, and copy that, in virtual format,
-   into VALBUF.  */
-
-#define DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf) \
-  i386_extract_return_value ((type), (regbuf), (valbuf))
-extern void i386_extract_return_value (struct type *type, char *regbuf,
-				       char *valbuf);
-
-/* Write into the appropriate registers a function return value stored
-   in VALBUF of type TYPE, given in virtual format.  */
-
-#define STORE_RETURN_VALUE(type, valbuf) \
-  i386_store_return_value ((type), (valbuf))
-extern void i386_store_return_value (struct type *type, char *valbuf);
-
-/* Extract from an array REGBUF containing the (raw) register state
-   the address in which a function should return its structure value,
-   as a CORE_ADDR.  */
-
-#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) \
-  i386_extract_struct_value_address ((regbuf))
-extern CORE_ADDR i386_extract_struct_value_address (char *regbuf);
-
-
 /* Things needed for making the inferior call functions.  */
 
 /* "An argument's size is increased, if necessary, to make it a
    multiple of [32 bit] words.  This may require tail padding,
    depending on the size of the argument" - from the x86 ABI.  */
 #define PARM_BOUNDARY 32
-
-/* Push an empty stack frame, to record the current PC, etc.  */
-
-#define PUSH_DUMMY_FRAME { i386_push_dummy_frame (); }
-
-extern void i386_push_dummy_frame (void);
-
-/* Discard from the stack the innermost frame, restoring all registers.  */
-
-#define POP_FRAME  { i386_pop_frame (); }
-
-extern void i386_pop_frame (void);
 
 
 /* this is 


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