2003-03-30 Andrew Cagney <cagney@redhat.com>
authorAndrew Cagney <cagney@redhat.com>
Sun, 30 Mar 2003 14:59:02 +0000 (14:59 +0000)
committerAndrew Cagney <cagney@redhat.com>
Sun, 30 Mar 2003 14:59:02 +0000 (14:59 +0000)
* gdbarch.sh (DEPRECATED_DUMMY_WRITE_SP): Replace TARGET_WRITE_SP.
* gdbarch.h, gdbarch.c: Regenerate.
* v850-tdep.c (v850_gdbarch_init): Set deprecated_dummy_write_sp.
* 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.

2003-03-30  Andrew Cagney  <cagney@redhat.com>

* gdbint.texinfo (Target Architecture Definition): Remove
reference to TARGET_WRITE_SP.

30 files changed:
gdb/ChangeLog
gdb/alpha-tdep.c
gdb/arm-tdep.c
gdb/avr-tdep.c
gdb/config/pa/tm-hppa.h
gdb/config/sparc/tm-sp64.h
gdb/cris-tdep.c
gdb/doc/ChangeLog
gdb/doc/gdbint.texinfo
gdb/frv-tdep.c
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh
gdb/h8300-tdep.c
gdb/i386-tdep.c
gdb/ia64-tdep.c
gdb/m68hc11-tdep.c
gdb/m68k-tdep.c
gdb/mcore-tdep.c
gdb/mips-tdep.c
gdb/mn10300-tdep.c
gdb/ns32k-tdep.c
gdb/rs6000-tdep.c
gdb/s390-tdep.c
gdb/sh-tdep.c
gdb/sparc-tdep.c
gdb/v850-tdep.c
gdb/valops.c
gdb/vax-tdep.c
gdb/xstormy16-tdep.c

index 66efad6136a9ae2645ce54aa1c676b7940d3f495..55eb03dc1dd06fb1f9bbdb8a4868797fba9c26dc 100644 (file)
@@ -1,3 +1,34 @@
+2003-03-30  Andrew Cagney  <cagney@redhat.com>
+
+       * gdbarch.sh (DEPRECATED_DUMMY_WRITE_SP): Replace TARGET_WRITE_SP.
+       * gdbarch.h, gdbarch.c: Regenerate.
+       * v850-tdep.c (v850_gdbarch_init): Set deprecated_dummy_write_sp.
+       * 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.
+       
 2003-03-30  Andrew Cagney  <cagney@redhat.com>
 
        * infttrace.c: Include "gdbthread.h".
index d12c69ff1ae97d54e2980f33d7433250f9264d49..1a19257ca3d758f27c1604c15e8f84a5b74c0972 100644 (file)
@@ -1875,6 +1875,8 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   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 5cf33cfe95d34ecf75bd0f6f3a57c1e4d54da886..ca152515e1119c5667a315c9f2e3e011e86c3952 100644 (file)
@@ -2943,7 +2943,6 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
 
   set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
-  set_gdbarch_deprecated_push_return_address (gdbarch, arm_push_return_address);
 
   set_gdbarch_push_dummy_call (gdbarch, arm_push_dummy_call);
 
index 4ed090d5cf0505f05b9b27f04ed487db7390933c..d3da3aa8e5072c92224225cc4dcd8a8a1b914042 100644 (file)
@@ -1147,7 +1147,7 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   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 33ef7a1a57ba0d4f79600633dc1388a4c55c4be8..9c26c798258ce92357870fb02411a9ef454c7426 100644 (file)
@@ -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 0e0e404c8a8ee3bb976a31f20b116287a84cf67d..b4417b806136ec50122bfb3dfe19408233938f41 100644 (file)
@@ -274,7 +274,7 @@ extern void sparc64_write_sp (CORE_ADDR);
 
 #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 d79edf18a7edad70a93c0998162199b585b90bb0..a618f5547dbd83a56fc6962fdd279baa1713fc14 100644 (file)
@@ -4323,6 +4323,9 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   /* 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 1cc2b36d2256086ebf7f10d2cf59352906d789c4..4286726403f0c46fa1495620e8d2e0859908b5d5 100644 (file)
@@ -1,8 +1,13 @@
+2003-03-30  Andrew Cagney  <cagney@redhat.com>
+
+       * gdbint.texinfo (Target Architecture Definition): Remove
+       reference to TARGET_WRITE_SP.
+       
 2003-03-27  Andrew Cagney  <cagney@redhat.com>
 
        * gdbint.texinfo (Target Architecture Definition): Remove
        references to write_sp.
-       
+
 2003-03-27  Andrew Cagney  <cagney@redhat.com>
 
        * gdb.texinfo (GDB/MI Variable Objects): Replace @include with
index 46bbe088321770b5e20bfa28adf40f63a4f390f4..0530f818fba116e5320629358d7f087522b10032 100644 (file)
@@ -3777,10 +3777,8 @@ that is at the start of the real function.
 @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
-@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 @@ Number of bits in a short integer; defaults to @code{2 * TARGET_CHAR_BIT}.
 @findex TARGET_WRITE_PC
 @itemx TARGET_READ_SP
 @findex TARGET_READ_SP
-@itemx TARGET_WRITE_SP
-@findex TARGET_WRITE_SP
 @itemx TARGET_READ_FP
 @findex TARGET_READ_FP
 @findex read_pc
index 6be803ae1a8d15445770522dbab1033240c4e241..2711b52a26c11810ef2c0d178b5e0c2b0156f014 100644 (file)
@@ -1106,7 +1106,7 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   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 1f40cca29922043a04a36ba9241178ab19a30ae9..4d94614ecde96cdb1dd713730f954a952b9a13ff 100644 (file)
@@ -148,7 +148,7 @@ struct gdbarch
   gdbarch_write_pc_ftype *write_pc;
   gdbarch_read_fp_ftype *read_fp;
   gdbarch_read_sp_ftype *read_sp;
-  gdbarch_write_sp_ftype *write_sp;
+  gdbarch_deprecated_dummy_write_sp_ftype *deprecated_dummy_write_sp;
   gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
   gdbarch_pseudo_register_read_ftype *pseudo_register_read;
   gdbarch_pseudo_register_write_ftype *pseudo_register_write;
@@ -504,7 +504,6 @@ gdbarch_alloc (const struct gdbarch_info *info,
   current_gdbarch->write_pc = generic_target_write_pc;
   current_gdbarch->read_fp = generic_target_read_fp;
   current_gdbarch->read_sp = generic_target_read_sp;
-  current_gdbarch->write_sp = generic_target_write_sp;
   current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
   current_gdbarch->num_regs = -1;
   current_gdbarch->sp_regnum = -1;
@@ -632,7 +631,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
   /* Skip verify of write_pc, invalid_p == 0 */
   /* Skip verify of read_fp, invalid_p == 0 */
   /* Skip verify of read_sp, invalid_p == 0 */
-  /* Skip verify of write_sp, invalid_p == 0 */
+  /* Skip verify of deprecated_dummy_write_sp, has predicate */
   /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
   /* Skip verify of pseudo_register_read, has predicate */
   /* Skip verify of pseudo_register_write, has predicate */
@@ -1127,6 +1126,29 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
                         (long) current_gdbarch->deprecated_do_registers_info
                         /*DEPRECATED_DO_REGISTERS_INFO ()*/);
 #endif
+#ifdef DEPRECATED_DUMMY_WRITE_SP_P
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: %s # %s\n",
+                      "DEPRECATED_DUMMY_WRITE_SP_P()",
+                      XSTRING (DEPRECATED_DUMMY_WRITE_SP_P ()));
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP_P() = %d\n",
+                      DEPRECATED_DUMMY_WRITE_SP_P ());
+#endif
+#ifdef DEPRECATED_DUMMY_WRITE_SP
+#if GDB_MULTI_ARCH
+  /* Macro might contain `[{}]' when not multi-arch */
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: %s # %s\n",
+                      "DEPRECATED_DUMMY_WRITE_SP(val)",
+                      XSTRING (DEPRECATED_DUMMY_WRITE_SP (val)));
+#endif
+  if (GDB_MULTI_ARCH)
+    fprintf_unfiltered (file,
+                        "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP = <0x%08lx>\n",
+                        (long) current_gdbarch->deprecated_dummy_write_sp
+                        /*DEPRECATED_DUMMY_WRITE_SP ()*/);
+#endif
 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
 #if GDB_MULTI_ARCH
   /* Macro might contain `[{}]' when not multi-arch */
@@ -2575,20 +2597,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
                         "gdbarch_dump: TARGET_WRITE_PC = <0x%08lx>\n",
                         (long) current_gdbarch->write_pc
                         /*TARGET_WRITE_PC ()*/);
-#endif
-#ifdef TARGET_WRITE_SP
-#if GDB_MULTI_ARCH
-  /* Macro might contain `[{}]' when not multi-arch */
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "TARGET_WRITE_SP(val)",
-                      XSTRING (TARGET_WRITE_SP (val)));
-#endif
-  if (GDB_MULTI_ARCH)
-    fprintf_unfiltered (file,
-                        "gdbarch_dump: TARGET_WRITE_SP = <0x%08lx>\n",
-                        (long) current_gdbarch->write_sp
-                        /*TARGET_WRITE_SP ()*/);
 #endif
   if (GDB_MULTI_ARCH)
     fprintf_unfiltered (file,
@@ -2938,23 +2946,30 @@ set_gdbarch_read_sp (struct gdbarch *gdbarch,
   gdbarch->read_sp = read_sp;
 }
 
+int
+gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch)
+{
+  gdb_assert (gdbarch != NULL);
+  return gdbarch->deprecated_dummy_write_sp != 0;
+}
+
 void
-gdbarch_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
+gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->write_sp == 0)
+  if (gdbarch->deprecated_dummy_write_sp == 0)
     internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_write_sp invalid");
+                    "gdbarch: gdbarch_deprecated_dummy_write_sp invalid");
   if (gdbarch_debug >= 2)
-    fprintf_unfiltered (gdb_stdlog, "gdbarch_write_sp called\n");
-  gdbarch->write_sp (val);
+    fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_dummy_write_sp called\n");
+  gdbarch->deprecated_dummy_write_sp (val);
 }
 
 void
-set_gdbarch_write_sp (struct gdbarch *gdbarch,
-                      gdbarch_write_sp_ftype write_sp)
+set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch,
+                                       gdbarch_deprecated_dummy_write_sp_ftype deprecated_dummy_write_sp)
 {
-  gdbarch->write_sp = write_sp;
+  gdbarch->deprecated_dummy_write_sp = deprecated_dummy_write_sp;
 }
 
 void
index 94926fd6c2675a92f7c59798ce5a5b526044d0a7..de8cb2d994940d05c55695264e3f2792b73a1b86 100644 (file)
@@ -388,20 +388,42 @@ extern void set_gdbarch_read_sp (struct gdbarch *gdbarch, gdbarch_read_sp_ftype
 #endif
 #endif
 
+/* The dummy call frame SP should be set by push_dummy_call. */
+
+#if defined (DEPRECATED_DUMMY_WRITE_SP)
+/* Legacy for systems yet to multi-arch DEPRECATED_DUMMY_WRITE_SP */
+#if !defined (DEPRECATED_DUMMY_WRITE_SP_P)
+#define DEPRECATED_DUMMY_WRITE_SP_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_DUMMY_WRITE_SP_P)
+#define DEPRECATED_DUMMY_WRITE_SP_P() (0)
+#endif
+
+extern int gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DUMMY_WRITE_SP_P)
+#error "Non multi-arch definition of DEPRECATED_DUMMY_WRITE_SP"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_DUMMY_WRITE_SP_P)
+#define DEPRECATED_DUMMY_WRITE_SP_P() (gdbarch_deprecated_dummy_write_sp_p (current_gdbarch))
+#endif
+
 /* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (TARGET_WRITE_SP)
-#define TARGET_WRITE_SP(val) (generic_target_write_sp (val))
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_DUMMY_WRITE_SP)
+#define DEPRECATED_DUMMY_WRITE_SP(val) (internal_error (__FILE__, __LINE__, "DEPRECATED_DUMMY_WRITE_SP"), 0)
 #endif
 
-typedef void (gdbarch_write_sp_ftype) (CORE_ADDR val);
-extern void gdbarch_write_sp (struct gdbarch *gdbarch, CORE_ADDR val);
-extern void set_gdbarch_write_sp (struct gdbarch *gdbarch, gdbarch_write_sp_ftype *write_sp);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_WRITE_SP)
-#error "Non multi-arch definition of TARGET_WRITE_SP"
+typedef void (gdbarch_deprecated_dummy_write_sp_ftype) (CORE_ADDR val);
+extern void gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val);
+extern void set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, gdbarch_deprecated_dummy_write_sp_ftype *deprecated_dummy_write_sp);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DUMMY_WRITE_SP)
+#error "Non multi-arch definition of DEPRECATED_DUMMY_WRITE_SP"
 #endif
 #if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_WRITE_SP)
-#define TARGET_WRITE_SP(val) (gdbarch_write_sp (current_gdbarch, val))
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_DUMMY_WRITE_SP)
+#define DEPRECATED_DUMMY_WRITE_SP(val) (gdbarch_deprecated_dummy_write_sp (current_gdbarch, val))
 #endif
 #endif
 
index bb9d90c6f26d3b5296e1819c84c317115d47c3d1..91f22931eb18a4cf2da2b6b49d2739b8e522e978 100755 (executable)
@@ -430,7 +430,8 @@ f:2:TARGET_READ_PC:CORE_ADDR:read_pc:ptid_t ptid:ptid::0:generic_target_read_pc:
 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 3ade064f90d31c553e616f112212105b38f05f7a..e08cff7f85e543b0f18503780c9bb976ff709cab 100644 (file)
@@ -1175,6 +1175,9 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   /* 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 a797e7bb9014743c347a9ed883cda6d913be7cfd..ede206ff4e61684f0d1dcadcec6bd703b1d9e660 100644 (file)
@@ -1630,6 +1630,9 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   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 75f77f7f08eb15d96e24b3e267fcb0b61c266a2a..5ace9621151845bd3e50882ccebc08d223de4724 100644 (file)
@@ -2237,7 +2237,7 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   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 04d82df28c1c3ad3cf1bfdb6327b0ac5a38e325c..3fff897d9766413a920374271593fb7c6024def2 100644 (file)
@@ -1369,7 +1369,7 @@ m68hc11_gdbarch_init (struct gdbarch_info info,
   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 a72ea534671fb2e890b465b782359068123d9d82..c25f2e11d0c54e17d9511373bdd4dcd38ef55a22 100644 (file)
@@ -1051,6 +1051,9 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   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 1715babd19fb736c9b78d604aebbb1eedc1ce46f..a112eeeb9d876b6b64c8ca4e89b6ab01ac56446e 100644 (file)
@@ -1163,6 +1163,9 @@ mcore_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
      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 fcf3ad3d1848cbc4cdd94d2d3834272beff833f4..67f516b87fe62077f6b31b84cc714d66cf5a5b0f 100644 (file)
@@ -6003,7 +6003,7 @@ mips_gdbarch_init (struct gdbarch_info info,
   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 4e11652d0b1d82ea8dd660a2f1751d42a84829f5..156adbf2bd491e8faed8dd72720155098c287c52 100644 (file)
@@ -1204,6 +1204,9 @@ mn10300_gdbarch_init (struct gdbarch_info info,
 
   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 fbf0417f289650264aba6cd359f41f51a8496957..4e43674efb20e6e45ea9b61ced03fbb2f4860c03 100644 (file)
@@ -612,6 +612,9 @@ ns32k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   /* 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 420d830181a73eeb6a2f0098b3a22739e63a945f..6dea3d85045c03d50f26625d81c314c78bb4f157 100644 (file)
@@ -2876,7 +2876,7 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   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 f7233bc2a095e7b527eba667379296f7fda83ba8..6574874ae9a88976fa14e445e2801ff52ebb7533 100644 (file)
@@ -1907,6 +1907,9 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
       break;
     }
 
+  /* Should be using push_dummy_call.  */
+  set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+
   return gdbarch;
 }
 
index 931933518ef2875e16380845712f287404297926..38098b53192110e500bf3466ab19cd966b750567 100644 (file)
@@ -4641,7 +4641,7 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   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 e4f245702c1fb31cec22e8ac79f7174bd76fd658..a6ca7cd3a0fe3eaeaeeabaf371719a517f2f2e81 100644 (file)
@@ -1040,7 +1040,7 @@ sparc_push_dummy_frame (void)
 
   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 @@ sparc_pop_frame (void)
                        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 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
       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 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
       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 986c9f13af5982cac1c9852e511e3398c30351a9..e6720a4bea51639de5dd6e4bb7b32fda1ca588e5 100644 (file)
@@ -1292,6 +1292,9 @@ v850_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   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 6cbaa4fb5547ee7cf218456c3290a49415e13491..5b36cb76fef2b70500732d105f74b45fa9683514 100644 (file)
@@ -1696,8 +1696,8 @@ You must use a pointer to function type variable. Command ignored.", arg_name);
      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 d2ac421287253c5b4c0f20f887049314ca1a0063..aac62f3e13b66911d604ef447be015fec25b9ac4 100644 (file)
@@ -686,6 +686,9 @@ vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   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 a2283912d9d2830604e0b248c3d4229aadba7e47..1ddc03f39d7cb28b2ec70580dd808cc424ec3731 100644 (file)
@@ -1122,6 +1122,9 @@ xstormy16_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   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;
 }