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 rfc] TARGET_WRITE_SP -> DEPRECATED_DUMMY_WRITE_SP


Hello,

The attached patch replaces TARGET_WRITE_SP with DEPRECATED_DUMMY_WRITE_SP. Instead of providing this method, an architecture is expected to update the stack pointer as part of creating the fake call-frame (in push_dummy_call()).

To make DEPRECATED_DUMMY_WRITE_SP optional, all the existing targets (except the d10v) were updated to explicitly set this new method (gdb_mbuild.sh rules m'kay).

In addition, it alters the valops.c logic that decides if/when DEPRECATED_DUMMY_WRITE_SP() should be called:

     stored the stack pointer (as part of creating the fake call
      frame), and none of the code following that code adjusts the
      stack-pointer value, the below call is entirely redundant.  */
-  if (!gdbarch_push_dummy_call_p (current_gdbarch))
-    TARGET_WRITE_SP (sp);
+  if (DEPRECATED_DUMMY_WRITE_SP_P ())
+    DEPRECATED_DUMMY_WRITE_SP (sp);

   if (SAVE_DUMMY_FRAME_TOS_P ())
     SAVE_DUMMY_FRAME_TOS (sp);

By doing this, migrating to push_dummy_call() from push_arguments() is much easier. The SP code can be moved over separate to switching to push_dummy_call().


I'll look to commit in a few days,


Andrew

Index: doc/ChangeLog
2003-03-27  Andrew Cagney  <cagney at redhat dot com>

	* gdbint.texinfo (Target Architecture Definition): Remove
	reference to TARGET_WRITE_SP.
	
2003-03-28  Andrew Cagney  <cagney at redhat dot com>

	* gdbarch.sh (DEPRECATED_DUMMY_WRITE_SP): Replace TARGET_WRITE_SP.
	* gdbarch.h, gdbarch.c: Regenerate.
	* arm-tdep.c (arm_gdbarch_init): Set deprecated_dummy_write_sp.
	* v850-tdep.c (v850_gdbarch_init): Ditto.
	* xstormy16-tdep.c (xstormy16_gdbarch_init): Ditto.
	* mcore-tdep.c (mcore_gdbarch_init): Ditto.
	* m68k-tdep.c (m68k_gdbarch_init): Ditto.
	* i386-tdep.c (i386_gdbarch_init): Ditto.
	* h8300-tdep.c (h8300_gdbarch_init): Ditto.
	* cris-tdep.c (cris_gdbarch_init): Ditto.
	* vax-tdep.c (vax_gdbarch_init): Ditto.
	* s390-tdep.c (s390_gdbarch_init): Ditto.
	* ns32k-tdep.c (ns32k_gdbarch_init): Ditto.
	* mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
	* alpha-tdep.c (alpha_gdbarch_init): Ditto.
	* sparc-tdep.c (sparc_push_dummy_frame, sparc_pop_frame): Update.
	* config/sparc/tm-sp64.h (DEPRECATED_DUMMY_WRITE_SP): Update.
	* config/pa/tm-hppa.h (DEPRECATED_DUMMY_WRITE_SP): Define.
	* sparc-tdep.c (sparc_gdbarch_init): Update.
	* sh-tdep.c (sh_gdbarch_init): Update.
	* rs6000-tdep.c (rs6000_gdbarch_init): Update.
	* mips-tdep.c (mips_gdbarch_init): Update.
	* m68hc11-tdep.c (m68hc11_gdbarch_init): Update.
	* ia64-tdep.c (ia64_gdbarch_init): Update.
	* frv-tdep.c (frv_gdbarch_init): Update.
	* avr-tdep.c (avr_gdbarch_init): Update.
	* valops.c (hand_function_call): Replace TARGET_WRITE_SP with
	DEPRECATED_DUMMY_WRITE_SP.  Call when the method is available,
	instead of when push_dummy_call is not available.
	
Index: alpha-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/alpha-tdep.c,v
retrieving revision 1.71
diff -u -r1.71 alpha-tdep.c
--- alpha-tdep.c	26 Mar 2003 22:39:52 -0000	1.71
+++ alpha-tdep.c	28 Mar 2003 15:03:40 -0000
@@ -1875,6 +1875,8 @@
   set_gdbarch_call_dummy_start_offset (gdbarch, 0);
   set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
   set_gdbarch_deprecated_push_dummy_frame (gdbarch, alpha_push_dummy_frame);
+  /* Should be using push_dummy_call.  */
+  set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
   set_gdbarch_fix_call_dummy (gdbarch, alpha_fix_call_dummy);
   set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_noop);
   set_gdbarch_deprecated_init_frame_pc_first (gdbarch, alpha_init_frame_pc_first);
Index: arm-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/arm-tdep.c,v
retrieving revision 1.117
diff -u -r1.117 arm-tdep.c
--- arm-tdep.c	26 Mar 2003 22:39:52 -0000	1.117
+++ arm-tdep.c	28 Mar 2003 15:03:40 -0000
@@ -2929,6 +2929,8 @@
 
   set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
   set_gdbarch_push_return_address (gdbarch, arm_push_return_address);
+  /* Should be using push_dummy_call.  */
+  set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
 
   set_gdbarch_deprecated_push_arguments (gdbarch, arm_push_arguments);
 
Index: avr-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/avr-tdep.c,v
retrieving revision 1.35
diff -u -r1.35 avr-tdep.c
--- avr-tdep.c	26 Mar 2003 22:39:52 -0000	1.35
+++ avr-tdep.c	28 Mar 2003 15:03:41 -0000
@@ -1147,7 +1147,7 @@
   set_gdbarch_write_pc (gdbarch, avr_write_pc);
   set_gdbarch_read_fp (gdbarch, avr_read_fp);
   set_gdbarch_read_sp (gdbarch, avr_read_sp);
-  set_gdbarch_write_sp (gdbarch, avr_write_sp);
+  set_gdbarch_deprecated_dummy_write_sp (gdbarch, avr_write_sp);
 
   set_gdbarch_num_regs (gdbarch, AVR_NUM_REGS);
 
Index: cris-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/cris-tdep.c,v
retrieving revision 1.58
diff -u -r1.58 cris-tdep.c
--- cris-tdep.c	26 Mar 2003 22:39:52 -0000	1.58
+++ cris-tdep.c	28 Mar 2003 15:03:42 -0000
@@ -4323,6 +4323,9 @@
   /* Helpful for backtracing and returning in a call dummy.  */
   set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
 
+  /* Should be using push_dummy_call.  */
+  set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+
   /* Use target_specific function to define link map offsets.  */
   set_solib_svr4_fetch_link_map_offsets 
     (gdbarch, cris_linux_svr4_fetch_link_map_offsets);
Index: frv-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/frv-tdep.c,v
retrieving revision 1.24
diff -u -r1.24 frv-tdep.c
--- frv-tdep.c	26 Mar 2003 22:39:52 -0000	1.24
+++ frv-tdep.c	28 Mar 2003 15:03:42 -0000
@@ -1107,7 +1107,7 @@
   set_gdbarch_write_pc (gdbarch, generic_target_write_pc);
   set_gdbarch_read_fp (gdbarch, generic_target_read_fp);
   set_gdbarch_read_sp (gdbarch, generic_target_read_sp);
-  set_gdbarch_write_sp (gdbarch, generic_target_write_sp);
+  set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
 
   set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
   set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.211
diff -u -r1.211 gdbarch.sh
--- gdbarch.sh	26 Mar 2003 22:39:52 -0000	1.211
+++ gdbarch.sh	28 Mar 2003 15:03:44 -0000
@@ -430,7 +430,8 @@
 f:2:TARGET_WRITE_PC:void:write_pc:CORE_ADDR val, ptid_t ptid:val, ptid::0:generic_target_write_pc::0
 f:2:TARGET_READ_FP:CORE_ADDR:read_fp:void:::0:generic_target_read_fp::0
 f:2:TARGET_READ_SP:CORE_ADDR:read_sp:void:::0:generic_target_read_sp::0
-f:2:TARGET_WRITE_SP:void:write_sp:CORE_ADDR val:val::0:generic_target_write_sp::0
+# The dummy call frame SP should be set by push_dummy_call.
+F:2:DEPRECATED_DUMMY_WRITE_SP:void:deprecated_dummy_write_sp:CORE_ADDR val:val
 # Function for getting target's idea of a frame pointer.  FIXME: GDB's
 # whole scheme for dealing with "frames" and "frame pointers" needs a
 # serious shakedown.
Index: h8300-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/h8300-tdep.c,v
retrieving revision 1.47
diff -u -r1.47 h8300-tdep.c
--- h8300-tdep.c	26 Mar 2003 22:39:52 -0000	1.47
+++ h8300-tdep.c	28 Mar 2003 15:03:44 -0000
@@ -1175,6 +1175,9 @@
   /* set_gdbarch_stack_align (gdbarch, SOME_stack_align); */
   set_gdbarch_believe_pcc_promotion (gdbarch, 1);
 
+  /* Should be using push_dummy_call.  */
+  set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+
   return gdbarch;
 }
 
Index: i386-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-tdep.c,v
retrieving revision 1.123
diff -u -r1.123 i386-tdep.c
--- i386-tdep.c	26 Mar 2003 22:39:52 -0000	1.123
+++ i386-tdep.c	28 Mar 2003 15:03:44 -0000
@@ -1630,6 +1630,9 @@
   i386_add_reggroups (gdbarch);
   set_gdbarch_register_reggroup_p (gdbarch, i386_register_reggroup_p);
 
+  /* Should be using push_dummy_call.  */
+  set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+
   /* Hook in ABI-specific overrides, if they have been registered.  */
   gdbarch_init_osabi (info, gdbarch);
 
Index: ia64-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ia64-tdep.c,v
retrieving revision 1.59
diff -u -r1.59 ia64-tdep.c
--- ia64-tdep.c	26 Mar 2003 22:39:52 -0000	1.59
+++ ia64-tdep.c	28 Mar 2003 15:03:45 -0000
@@ -2238,7 +2238,7 @@
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
 
   set_gdbarch_read_sp (gdbarch, generic_target_read_sp);
-  set_gdbarch_write_sp (gdbarch, generic_target_write_sp);
+  set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
 
   set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
   set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
Index: m68hc11-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/m68hc11-tdep.c,v
retrieving revision 1.57
diff -u -r1.57 m68hc11-tdep.c
--- m68hc11-tdep.c	26 Mar 2003 22:39:52 -0000	1.57
+++ m68hc11-tdep.c	28 Mar 2003 15:03:45 -0000
@@ -1369,7 +1369,7 @@
   set_gdbarch_write_pc (gdbarch, generic_target_write_pc);
   set_gdbarch_read_fp (gdbarch, generic_target_read_fp);
   set_gdbarch_read_sp (gdbarch, generic_target_read_sp);
-  set_gdbarch_write_sp (gdbarch, generic_target_write_sp);
+  set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
 
   set_gdbarch_sp_regnum (gdbarch, HARD_SP_REGNUM);
   set_gdbarch_fp_regnum (gdbarch, SOFT_FP_REGNUM);
Index: m68k-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/m68k-tdep.c,v
retrieving revision 1.51
diff -u -r1.51 m68k-tdep.c
--- m68k-tdep.c	25 Mar 2003 22:56:40 -0000	1.51
+++ m68k-tdep.c	28 Mar 2003 15:03:45 -0000
@@ -1051,6 +1051,9 @@
   set_gdbarch_deprecated_push_dummy_frame (gdbarch, m68k_push_dummy_frame);
   set_gdbarch_deprecated_pop_frame (gdbarch, m68k_pop_frame);
 
+  /* Should be using push_dummy_call.  */
+  set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+
   return gdbarch;
 }
 
Index: mcore-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mcore-tdep.c,v
retrieving revision 1.48
diff -u -r1.48 mcore-tdep.c
--- mcore-tdep.c	26 Mar 2003 22:39:52 -0000	1.48
+++ mcore-tdep.c	28 Mar 2003 15:03:46 -0000
@@ -1163,6 +1163,9 @@
      between registers and stack.  */
   set_gdbarch_reg_struct_has_addr (gdbarch, mcore_reg_struct_has_addr);
 
+  /* Should be using push_dummy_call.  */
+  set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+
   return gdbarch;
 }
 
Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.178
diff -u -r1.178 mips-tdep.c
--- mips-tdep.c	26 Mar 2003 22:39:52 -0000	1.178
+++ mips-tdep.c	28 Mar 2003 15:03:47 -0000
@@ -6003,7 +6003,7 @@
   set_gdbarch_write_pc (gdbarch, generic_target_write_pc);
   set_gdbarch_read_fp (gdbarch, mips_read_sp); /* Draft FRAME base.  */
   set_gdbarch_read_sp (gdbarch, mips_read_sp);
-  set_gdbarch_write_sp (gdbarch, generic_target_write_sp);
+  set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
 
   /* Add/remove bits from an address.  The MIPS needs be careful to
      ensure that all 32 bit addresses are sign extended to 64 bits.  */
Index: mn10300-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mn10300-tdep.c,v
retrieving revision 1.63
diff -u -r1.63 mn10300-tdep.c
--- mn10300-tdep.c	26 Mar 2003 22:39:52 -0000	1.63
+++ mn10300-tdep.c	28 Mar 2003 15:03:48 -0000
@@ -1204,6 +1204,9 @@
 
   tdep->am33_mode = am33_mode;
 
+  /* Should be using push_dummy_call.  */
+  set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+
   return gdbarch;
 }
  
Index: ns32k-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ns32k-tdep.c,v
retrieving revision 1.39
diff -u -r1.39 ns32k-tdep.c
--- ns32k-tdep.c	25 Mar 2003 20:38:46 -0000	1.39
+++ ns32k-tdep.c	28 Mar 2003 15:03:48 -0000
@@ -611,6 +611,9 @@
   /* Misc info */
   set_gdbarch_function_start_offset (gdbarch, 0);
 
+  /* Should be using push_dummy_call.  */
+  set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+
   /* Hook in OS ABI-specific overrides, if they have been registered.  */
   gdbarch_init_osabi (info, gdbarch);
 
Index: rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.116
diff -u -r1.116 rs6000-tdep.c
--- rs6000-tdep.c	26 Mar 2003 22:39:52 -0000	1.116
+++ rs6000-tdep.c	28 Mar 2003 15:03:48 -0000
@@ -2876,7 +2876,7 @@
   set_gdbarch_write_pc (gdbarch, generic_target_write_pc);
   set_gdbarch_read_fp (gdbarch, generic_target_read_fp);
   set_gdbarch_read_sp (gdbarch, generic_target_read_sp);
-  set_gdbarch_write_sp (gdbarch, generic_target_write_sp);
+  set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
 
   set_gdbarch_num_regs (gdbarch, v->nregs);
   set_gdbarch_num_pseudo_regs (gdbarch, v->npregs);
Index: s390-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/s390-tdep.c,v
retrieving revision 1.81
diff -u -r1.81 s390-tdep.c
--- s390-tdep.c	26 Mar 2003 22:39:52 -0000	1.81
+++ s390-tdep.c	28 Mar 2003 15:03:49 -0000
@@ -1907,6 +1907,9 @@
       break;
     }
 
+  /* Should be using push_dummy_call.  */
+  set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+
   return gdbarch;
 }
 
Index: sh-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sh-tdep.c,v
retrieving revision 1.107
diff -u -r1.107 sh-tdep.c
--- sh-tdep.c	26 Mar 2003 22:39:52 -0000	1.107
+++ sh-tdep.c	28 Mar 2003 15:03:50 -0000
@@ -4641,7 +4641,7 @@
   set_gdbarch_write_pc (gdbarch, generic_target_write_pc);
   set_gdbarch_read_fp (gdbarch, generic_target_read_fp);
   set_gdbarch_read_sp (gdbarch, generic_target_read_sp);
-  set_gdbarch_write_sp (gdbarch, generic_target_write_sp);
+  set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
 
   set_gdbarch_register_name (gdbarch, sh_register_name);
   set_gdbarch_register_virtual_type (gdbarch, sh_register_virtual_type);
Index: sparc-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sparc-tdep.c,v
retrieving revision 1.79
diff -u -r1.79 sparc-tdep.c
--- sparc-tdep.c	27 Mar 2003 15:29:44 -0000	1.79
+++ sparc-tdep.c	28 Mar 2003 15:03:50 -0000
@@ -1040,7 +1040,7 @@
 
   sp -= DUMMY_STACK_SIZE;
 
-  TARGET_WRITE_SP (sp);
+  DEPRECATED_DUMMY_WRITE_SP (sp);
 
   write_memory (sp + DUMMY_REG_SAVE_OFFSET, &register_temp[0],
 		DUMMY_STACK_REG_BUF_SIZE);
@@ -1310,7 +1310,7 @@
 			read_memory_integer (fsr[O0_REGNUM + 7],
 					     SPARC_INTREG_SIZE));
 
-      TARGET_WRITE_SP (get_frame_base (frame));
+      DEPRECATED_DUMMY_WRITE_SP (get_frame_base (frame));
     }
   else if (fsr[I0_REGNUM])
     {
@@ -3279,7 +3279,7 @@
       set_gdbarch_deprecated_store_struct_return (gdbarch, sparc32_store_struct_return);
       set_gdbarch_use_struct_convention (gdbarch, 
 					 generic_use_struct_convention);
-      set_gdbarch_write_sp (gdbarch, generic_target_write_sp);
+      set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
       tdep->y_regnum = SPARC32_Y_REGNUM;
       tdep->fp_max_regnum = SPARC_FP0_REGNUM + 32;
       tdep->intreg_size = 4;
@@ -3337,7 +3337,7 @@
       set_gdbarch_deprecated_store_struct_return (gdbarch, sparc64_store_struct_return);
       set_gdbarch_use_struct_convention (gdbarch, 
 					 sparc64_use_struct_convention);
-      set_gdbarch_write_sp (gdbarch, sparc64_write_sp);
+      set_gdbarch_deprecated_dummy_write_sp (gdbarch, sparc64_write_sp);
       tdep->y_regnum = SPARC64_Y_REGNUM;
       tdep->fp_max_regnum = SPARC_FP0_REGNUM + 48;
       tdep->intreg_size = 8;
Index: v850-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/v850-tdep.c,v
retrieving revision 1.48
diff -u -r1.48 v850-tdep.c
--- v850-tdep.c	26 Mar 2003 22:39:52 -0000	1.48
+++ v850-tdep.c	28 Mar 2003 15:03:51 -0000
@@ -1292,6 +1292,9 @@
   set_gdbarch_addr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
   set_gdbarch_long_double_bit (gdbarch, 8 * TARGET_CHAR_BIT);
 
+  /* Should be using push_dummy_call.  */
+  set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+
   return gdbarch;
 }
 
Index: valops.c
===================================================================
RCS file: /cvs/src/src/gdb/valops.c,v
retrieving revision 1.100
diff -u -r1.100 valops.c
--- valops.c	27 Mar 2003 15:29:44 -0000	1.100
+++ valops.c	28 Mar 2003 15:03:52 -0000
@@ -1696,8 +1696,8 @@
      stored the stack pointer (as part of creating the fake call
      frame), and none of the code following that code adjusts the
      stack-pointer value, the below call is entirely redundant.  */
-  if (!gdbarch_push_dummy_call_p (current_gdbarch))
-    TARGET_WRITE_SP (sp);
+  if (DEPRECATED_DUMMY_WRITE_SP_P ())
+    DEPRECATED_DUMMY_WRITE_SP (sp);
 
   if (SAVE_DUMMY_FRAME_TOS_P ())
     SAVE_DUMMY_FRAME_TOS (sp);
Index: vax-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/vax-tdep.c,v
retrieving revision 1.40
diff -u -r1.40 vax-tdep.c
--- vax-tdep.c	25 Mar 2003 20:38:47 -0000	1.40
+++ vax-tdep.c	28 Mar 2003 15:03:52 -0000
@@ -686,6 +686,9 @@
   set_gdbarch_function_start_offset (gdbarch, 2);
   set_gdbarch_believe_pcc_promotion (gdbarch, 1);
 
+  /* Should be using push_dummy_call.  */
+  set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+
   /* Hook in ABI-specific overrides, if they have been registered.  */
   gdbarch_init_osabi (info, gdbarch);
 
Index: xstormy16-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/xstormy16-tdep.c,v
retrieving revision 1.37
diff -u -r1.37 xstormy16-tdep.c
--- xstormy16-tdep.c	26 Mar 2003 22:39:52 -0000	1.37
+++ xstormy16-tdep.c	28 Mar 2003 15:03:52 -0000
@@ -1122,6 +1122,9 @@
   set_gdbarch_in_solib_call_trampoline (gdbarch,
 					xstormy16_in_solib_call_trampoline);
 
+  /* Should be using push_dummy_call.  */
+  set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+
   return gdbarch;
 }
 
Index: config/pa/tm-hppa.h
===================================================================
RCS file: /cvs/src/src/gdb/config/pa/tm-hppa.h,v
retrieving revision 1.41
diff -u -r1.41 tm-hppa.h
--- config/pa/tm-hppa.h	26 Mar 2003 22:39:53 -0000	1.41
+++ config/pa/tm-hppa.h	28 Mar 2003 15:03:52 -0000
@@ -24,6 +24,9 @@
 
 #include "regcache.h"
 
+/* Wonder if this is correct?  Should be using push_dummy_call().  */
+#define DEPRECATED_DUMMY_WRITE_SP(SP) generic_target_write_sp (SP)
+
 #define GDB_MULTI_ARCH 0
 
 /* NOTE: cagney/2002-11-24: This is a guess.  */
Index: config/sparc/tm-sp64.h
===================================================================
RCS file: /cvs/src/src/gdb/config/sparc/tm-sp64.h,v
retrieving revision 1.15
diff -u -r1.15 tm-sp64.h
--- config/sparc/tm-sp64.h	26 Mar 2003 22:39:53 -0000	1.15
+++ config/sparc/tm-sp64.h	28 Mar 2003 15:03:52 -0000
@@ -274,7 +274,7 @@
 
 #define TARGET_READ_SP() (sparc64_read_sp ())
 #define TARGET_READ_FP() (sparc64_read_fp ())
-#define TARGET_WRITE_SP(X) (sparc64_write_sp (X))
+#define DEPRECATED_DUMMY_WRITE_SP(X) (sparc64_write_sp (X))
 
 #undef DEPRECATED_EXTRACT_RETURN_VALUE
 #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
Index: doc/gdbint.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdbint.texinfo,v
retrieving revision 1.136
diff -u -r1.136 gdbint.texinfo
--- doc/gdbint.texinfo	27 Mar 2003 15:29:45 -0000	1.136
+++ doc/gdbint.texinfo	28 Mar 2003 15:03:55 -0000
@@ -3777,10 +3777,8 @@
 @item SP_REGNUM
 @findex SP_REGNUM
 If the stack-pointer is kept in a register, then define this macro to be
-the number (greater than or equal to zero) of that register.
-
-This should only need to be defined if @code{TARGET_WRITE_SP} and
- at code{TARGET_WRITE_SP} are not defined.
+the number (greater than or equal to zero) of that register, or -1 if
+there is no such register.
 
 @item STAB_REG_TO_REGNUM
 @findex STAB_REG_TO_REGNUM
@@ -3887,8 +3885,6 @@
 @findex TARGET_WRITE_PC
 @itemx TARGET_READ_SP
 @findex TARGET_READ_SP
- at itemx TARGET_WRITE_SP
- at findex TARGET_WRITE_SP
 @itemx TARGET_READ_FP
 @findex TARGET_READ_FP
 @findex read_pc

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