mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-27 09:38:57 +00:00
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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
void
|
||||
gdbarch_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
|
||||
int
|
||||
gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch)
|
||||
{
|
||||
gdb_assert (gdbarch != NULL);
|
||||
if (gdbarch->write_sp == 0)
|
||||
internal_error (__FILE__, __LINE__,
|
||||
"gdbarch: gdbarch_write_sp invalid");
|
||||
if (gdbarch_debug >= 2)
|
||||
fprintf_unfiltered (gdb_stdlog, "gdbarch_write_sp called\n");
|
||||
gdbarch->write_sp (val);
|
||||
return gdbarch->deprecated_dummy_write_sp != 0;
|
||||
}
|
||||
|
||||
void
|
||||
set_gdbarch_write_sp (struct gdbarch *gdbarch,
|
||||
gdbarch_write_sp_ftype write_sp)
|
||||
gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
|
||||
{
|
||||
gdbarch->write_sp = write_sp;
|
||||
gdb_assert (gdbarch != NULL);
|
||||
if (gdbarch->deprecated_dummy_write_sp == 0)
|
||||
internal_error (__FILE__, __LINE__,
|
||||
"gdbarch: gdbarch_deprecated_dummy_write_sp invalid");
|
||||
if (gdbarch_debug >= 2)
|
||||
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_dummy_write_sp called\n");
|
||||
gdbarch->deprecated_dummy_write_sp (val);
|
||||
}
|
||||
|
||||
void
|
||||
set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch,
|
||||
gdbarch_deprecated_dummy_write_sp_ftype deprecated_dummy_write_sp)
|
||||
{
|
||||
gdbarch->deprecated_dummy_write_sp = deprecated_dummy_write_sp;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user