aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-03-30 14:59:02 +0000
committerAndrew Cagney <cagney@redhat.com>2003-03-30 14:59:02 +0000
commit6c0e89edf99f71dcd9a8979e99388c9286e49edd (patch)
tree2368f97b2bd842c204d40bbd77aaec0b404c4277 /gdb/gdbarch.c
parentf7dd6af2b559a621e7e36ba3eaadfb6a11006cdf (diff)
downloadgdb-6c0e89edf99f71dcd9a8979e99388c9286e49edd.zip
gdb-6c0e89edf99f71dcd9a8979e99388c9286e49edd.tar.gz
gdb-6c0e89edf99f71dcd9a8979e99388c9286e49edd.tar.bz2
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> * gdbint.texinfo (Target Architecture Definition): Remove reference to TARGET_WRITE_SP.
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r--gdb/gdbarch.c65
1 files changed, 40 insertions, 25 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 1f40cca..4d94614 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -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 */
@@ -2576,20 +2598,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(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,
"gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
@@ -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