diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-06-07 22:38:56 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-06-07 22:38:56 +0000 |
commit | 04446085db7a2fde4557948e3d02cf99e6b94dfe (patch) | |
tree | ed8721fd10a65133d547a6c4fae47678f05b25a6 | |
parent | 4480575bc53201f69e78a62e51fa62f5198c7ce8 (diff) | |
download | gdb-04446085db7a2fde4557948e3d02cf99e6b94dfe.tar.gz |
2003-06-07 Andrew Cagney <cagney@redhat.com>
* inferior.h (deprecated_write_sp): Replace
generic_target_write_sp.
* regcache.c (deprecated_write_sp): Replace
generic_target_write_sp.
* xstormy16-tdep.c (xstormy16_gdbarch_init): Update.
* vax-tdep.c (vax_gdbarch_init): Update.
* v850-tdep.c (v850_gdbarch_init): Update.
* sparc-tdep.c (sparc_gdbarch_init): Update.
* sh-tdep.c (sh_gdbarch_init): Update.
* s390-tdep.c (s390_gdbarch_init): Update.
* rs6000-tdep.c (rs6000_gdbarch_init): Update.
* ns32k-tdep.c (ns32k_gdbarch_init): Update.
* mn10300-tdep.c (mn10300_gdbarch_init): Update.
* mcore-tdep.c (mcore_gdbarch_init): Update.
* m68k-tdep.c (m68k_gdbarch_init): Update.
* m68hc11-tdep.c (m68hc11_gdbarch_init): Update.
* ia64-tdep.c (ia64_gdbarch_init): Update.
* h8300-tdep.c (h8300_gdbarch_init): Update.
* frv-tdep.c (frv_gdbarch_init): Update.
* cris-tdep.c (cris_gdbarch_init): Update.
* config/pa/tm-hppa.h (DEPRECATED_DUMMY_WRITE_SP): Update.
-rw-r--r-- | gdb/ChangeLog | 24 | ||||
-rw-r--r-- | gdb/config/pa/tm-hppa.h | 2 | ||||
-rw-r--r-- | gdb/cris-tdep.c | 2 | ||||
-rw-r--r-- | gdb/frv-tdep.c | 2 | ||||
-rw-r--r-- | gdb/h8300-tdep.c | 2 | ||||
-rw-r--r-- | gdb/ia64-tdep.c | 2 | ||||
-rw-r--r-- | gdb/inferior.h | 2 | ||||
-rw-r--r-- | gdb/m68hc11-tdep.c | 2 | ||||
-rw-r--r-- | gdb/m68k-tdep.c | 2 | ||||
-rw-r--r-- | gdb/mcore-tdep.c | 2 | ||||
-rw-r--r-- | gdb/mn10300-tdep.c | 2 | ||||
-rw-r--r-- | gdb/ns32k-tdep.c | 2 | ||||
-rw-r--r-- | gdb/regcache.c | 16 | ||||
-rw-r--r-- | gdb/rs6000-tdep.c | 2 | ||||
-rw-r--r-- | gdb/s390-tdep.c | 2 | ||||
-rw-r--r-- | gdb/sh-tdep.c | 2 | ||||
-rw-r--r-- | gdb/sparc-tdep.c | 2 | ||||
-rw-r--r-- | gdb/v850-tdep.c | 2 | ||||
-rw-r--r-- | gdb/vax-tdep.c | 2 | ||||
-rw-r--r-- | gdb/xstormy16-tdep.c | 2 |
20 files changed, 45 insertions, 31 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 99f522eb917..75896250e04 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,29 @@ 2003-06-07 Andrew Cagney <cagney@redhat.com> + * inferior.h (deprecated_write_sp): Replace + generic_target_write_sp. + * regcache.c (deprecated_write_sp): Replace + generic_target_write_sp. + * xstormy16-tdep.c (xstormy16_gdbarch_init): Update. + * vax-tdep.c (vax_gdbarch_init): Update. + * v850-tdep.c (v850_gdbarch_init): Update. + * sparc-tdep.c (sparc_gdbarch_init): Update. + * sh-tdep.c (sh_gdbarch_init): Update. + * s390-tdep.c (s390_gdbarch_init): Update. + * rs6000-tdep.c (rs6000_gdbarch_init): Update. + * ns32k-tdep.c (ns32k_gdbarch_init): Update. + * mn10300-tdep.c (mn10300_gdbarch_init): Update. + * mcore-tdep.c (mcore_gdbarch_init): Update. + * m68k-tdep.c (m68k_gdbarch_init): Update. + * m68hc11-tdep.c (m68hc11_gdbarch_init): Update. + * ia64-tdep.c (ia64_gdbarch_init): Update. + * h8300-tdep.c (h8300_gdbarch_init): Update. + * frv-tdep.c (frv_gdbarch_init): Update. + * cris-tdep.c (cris_gdbarch_init): Update. + * config/pa/tm-hppa.h (DEPRECATED_DUMMY_WRITE_SP): Update. + +2003-06-07 Andrew Cagney <cagney@redhat.com> + * dwarf2-frame.c (dwarf2_frame_cache): Add comments on PC_REGNUM. Assert that PC_REGNUM is valid. (dwarf2_frame_prev_register): Add comments on SP_REGNUM. diff --git a/gdb/config/pa/tm-hppa.h b/gdb/config/pa/tm-hppa.h index afc87fa48a5..1ec91d453f6 100644 --- a/gdb/config/pa/tm-hppa.h +++ b/gdb/config/pa/tm-hppa.h @@ -25,7 +25,7 @@ #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 DEPRECATED_DUMMY_WRITE_SP(SP) deprecated_write_sp (SP) #ifndef GDB_MULTI_ARCH #define GDB_MULTI_ARCH 1 diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c index 76a0250a4a2..7bf7e9a60ba 100644 --- a/gdb/cris-tdep.c +++ b/gdb/cris-tdep.c @@ -4308,7 +4308,7 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) 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); + set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp); /* Use target_specific function to define link map offsets. */ set_solib_svr4_fetch_link_map_offsets diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c index a2edfb36350..c978ec48b5c 100644 --- a/gdb/frv-tdep.c +++ b/gdb/frv-tdep.c @@ -1100,7 +1100,7 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_inner_than (gdbarch, core_addr_lessthan); set_gdbarch_write_pc (gdbarch, generic_target_write_pc); - set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp); + set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp); set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point); diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c index 00d605e6f89..43ecf50a519 100644 --- a/gdb/h8300-tdep.c +++ b/gdb/h8300-tdep.c @@ -1196,7 +1196,7 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_believe_pcc_promotion (gdbarch, 1); /* Should be using push_dummy_call. */ - set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp); + set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp); return gdbarch; } diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c index 89d623fc52c..e803ee8e29e 100644 --- a/gdb/ia64-tdep.c +++ b/gdb/ia64-tdep.c @@ -2313,7 +2313,7 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Settings that should be unnecessary. */ set_gdbarch_inner_than (gdbarch, core_addr_lessthan); - set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp); + set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp); set_gdbarch_decr_pc_after_break (gdbarch, 0); set_gdbarch_function_start_offset (gdbarch, 0); diff --git a/gdb/inferior.h b/gdb/inferior.h index df85cc36257..ed49d2315d9 100644 --- a/gdb/inferior.h +++ b/gdb/inferior.h @@ -176,7 +176,7 @@ extern void generic_target_write_pc (CORE_ADDR, ptid_t); extern CORE_ADDR read_sp (void); -extern void generic_target_write_sp (CORE_ADDR); +extern void deprecated_write_sp (CORE_ADDR); extern CORE_ADDR deprecated_read_fp (void); diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c index fbeb5e7c045..139689d421d 100644 --- a/gdb/m68hc11-tdep.c +++ b/gdb/m68hc11-tdep.c @@ -1366,7 +1366,7 @@ m68hc11_gdbarch_init (struct gdbarch_info info, set_gdbarch_frame_args_skip (gdbarch, 0); set_gdbarch_write_pc (gdbarch, generic_target_write_pc); - set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp); + set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp); set_gdbarch_sp_regnum (gdbarch, HARD_SP_REGNUM); set_gdbarch_deprecated_fp_regnum (gdbarch, SOFT_FP_REGNUM); diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c index 44be19da5de..5f21fb188c0 100644 --- a/gdb/m68k-tdep.c +++ b/gdb/m68k-tdep.c @@ -964,7 +964,7 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) 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); + set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp); /* Disassembler. */ set_gdbarch_print_insn (gdbarch, print_insn_m68k); diff --git a/gdb/mcore-tdep.c b/gdb/mcore-tdep.c index cd544f67e6a..b24a7358ef6 100644 --- a/gdb/mcore-tdep.c +++ b/gdb/mcore-tdep.c @@ -1159,7 +1159,7 @@ mcore_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) 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); + set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp); return gdbarch; } diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c index dbb1a6b6527..d6d39b904b8 100644 --- a/gdb/mn10300-tdep.c +++ b/gdb/mn10300-tdep.c @@ -1208,7 +1208,7 @@ 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); + set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp); return gdbarch; } diff --git a/gdb/ns32k-tdep.c b/gdb/ns32k-tdep.c index dfdd315f03c..5dacfdf04a3 100644 --- a/gdb/ns32k-tdep.c +++ b/gdb/ns32k-tdep.c @@ -611,7 +611,7 @@ ns32k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_function_start_offset (gdbarch, 0); /* Should be using push_dummy_call. */ - set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp); + set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp); /* Hook in OS ABI-specific overrides, if they have been registered. */ gdbarch_init_osabi (info, gdbarch); diff --git a/gdb/regcache.c b/gdb/regcache.c index 2d3c987aac6..6bb62f02f1d 100644 --- a/gdb/regcache.c +++ b/gdb/regcache.c @@ -1273,9 +1273,6 @@ regcache_collect (int regnum, void *buf) they will use the contextual information provided by the FRAME. These functions do not belong in the register cache. */ -/* NOTE: cagney/2003-06-07: The function generic_target_write_sp() - should be deleted. */ - /* NOTE: cagney/2003-06-07: The functions generic_target_write_pc(), write_pc_pid(), write_pc(), and deprecated_read_fp(), all need to be replaced by something that does not rely on global state. But @@ -1361,17 +1358,10 @@ read_sp (void) } void -generic_target_write_sp (CORE_ADDR val) +deprecated_write_sp (CORE_ADDR val) { -#ifdef SP_REGNUM - if (SP_REGNUM >= 0) - { - write_register (SP_REGNUM, val); - return; - } -#endif - internal_error (__FILE__, __LINE__, - "generic_target_write_sp"); + gdb_assert (SP_REGNUM >= 0); + write_register (SP_REGNUM, val); } CORE_ADDR diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index 719d575969c..e639e6a92a1 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -2911,7 +2911,7 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_print_insn (gdbarch, gdb_print_insn_powerpc); set_gdbarch_write_pc (gdbarch, generic_target_write_pc); - set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp); + set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp); set_gdbarch_num_regs (gdbarch, v->nregs); set_gdbarch_num_pseudo_regs (gdbarch, v->npregs); diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c index c7dce06a17b..f3810a8817b 100644 --- a/gdb/s390-tdep.c +++ b/gdb/s390-tdep.c @@ -1911,7 +1911,7 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) } /* Should be using push_dummy_call. */ - set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp); + set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp); return gdbarch; } diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c index ad036b5f5ff..c0875d5d377 100644 --- a/gdb/sh-tdep.c +++ b/gdb/sh-tdep.c @@ -4638,7 +4638,7 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) } set_gdbarch_write_pc (gdbarch, generic_target_write_pc); - set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp); + set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp); set_gdbarch_register_name (gdbarch, sh_register_name); set_gdbarch_register_virtual_type (gdbarch, sh_register_virtual_type); diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c index 8462a186257..e14db143cb5 100644 --- a/gdb/sparc-tdep.c +++ b/gdb/sparc-tdep.c @@ -3440,7 +3440,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_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp); + set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp); tdep->y_regnum = SPARC32_Y_REGNUM; tdep->fp_max_regnum = SPARC_FP0_REGNUM + 32; tdep->intreg_size = 4; diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c index f415af12823..2610e633dd1 100644 --- a/gdb/v850-tdep.c +++ b/gdb/v850-tdep.c @@ -1288,7 +1288,7 @@ v850_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) 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); + set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp); return gdbarch; } diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c index fe96e7f8488..71eb6973510 100644 --- a/gdb/vax-tdep.c +++ b/gdb/vax-tdep.c @@ -435,7 +435,7 @@ vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_believe_pcc_promotion (gdbarch, 1); /* Should be using push_dummy_call. */ - set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp); + set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp); /* Hook in ABI-specific overrides, if they have been registered. */ gdbarch_init_osabi (info, gdbarch); diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c index 97cdd0af047..19f1abf487c 100644 --- a/gdb/xstormy16-tdep.c +++ b/gdb/xstormy16-tdep.c @@ -1114,7 +1114,7 @@ xstormy16_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) xstormy16_in_solib_call_trampoline); /* Should be using push_dummy_call. */ - set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp); + set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp); return gdbarch; } |