diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-04-29 01:49:49 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-04-29 01:49:49 +0000 |
commit | 0ba6dca974b6df1fc1ac67608815cf5a2603856d (patch) | |
tree | dbcece7b70356e620a0ba46bf2ca570f3fdb9843 /gdb/gdbarch.c | |
parent | 3c9dc02ab9da3692af0315608b064a635b974159 (diff) | |
download | gdb-0ba6dca974b6df1fc1ac67608815cf5a2603856d.zip gdb-0ba6dca974b6df1fc1ac67608815cf5a2603856d.tar.gz gdb-0ba6dca974b6df1fc1ac67608815cf5a2603856d.tar.bz2 |
2003-04-28 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (DEPRECATED_TARGET_READ_FP): Replace TARGET_READ_FP.
(DEPRECATED_FP_REGNUM): Replace FP_REGNUM.
* gdbarch.h, gdbarch.c: Re-generate.
* infcall.c (call_function_by_hand): Use DEPRECATED_FP_REGNUM,
DEPRECATED_TARGET_READ_FP, or "sp" to create the dummy frame ID.
* inferior.h (deprecated_read_fp): Rename read_fp.
(generic_target_read_fp): Delete declaration.
* regcache.c (generic_target_read_fp): Delete function.
(deprecated_read_fp): Replace read_fp, use
DEPRECATED_TARGET_READ_FP or DEPRECATED_FP_REGNUM.
* d10v-tdep.c (d10v_read_fp): Delete function.
(d10v_gdbarch_init): Do not set deprecated_read_fp.
* sparc-tdep.c (sparc_gdbarch_init): Do not set
deprecated_target_read_fp to generic_target_read_fp.
* sh-tdep.c (sh_gdbarch_init): Ditto.
* rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
* m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
* frv-tdep.c (frv_gdbarch_init): Ditto.
* xstormy16-tdep.c (xstormy16_gdbarch_init): Set
deprecated_fp_regnum.
* x86-64-tdep.c (x86_64_init_abi): Ditto.
* vax-tdep.c (vax_gdbarch_init): Ditto.
* v850-tdep.c (v850_gdbarch_init): Ditto.
* sparc-tdep.c (sparc_gdbarch_init): Ditto.
* sh-tdep.c (sh_gdbarch_init): Ditto.
* s390-tdep.c (s390_gdbarch_init): Ditto.
* rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
* mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
* mcore-tdep.c (mcore_gdbarch_init): Ditto.
* m68k-tdep.c (m68k_gdbarch_init): Ditto.
* m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
* ia64-tdep.c (ia64_gdbarch_init): Ditto.
* i386-tdep.c (i386_gdbarch_init): Ditto.
* hppa-tdep.c (hppa_gdbarch_init): Ditto.
* h8300-tdep.c (h8300_gdbarch_init): Ditto.
* frv-tdep.c (frv_gdbarch_init): Ditto.
* cris-tdep.c (cris_gdbarch_init): Ditto.
* avr-tdep.c (avr_gdbarch_init): Ditto.
* arm-tdep.c (arm_gdbarch_init): Ditto.
* alpha-tdep.c (alpha_gdbarch_init): Ditto.
* x86-64-tdep.c (x86_64_init_abi): Set deprecated_target_read_fp.
* v850-tdep.c (v850_gdbarch_init): Ditto.
* sparc-tdep.c (sparc_gdbarch_init): Ditto.
* sh-tdep.c (sh_gdbarch_init): Ditto.
* s390-tdep.c (s390_gdbarch_init): Ditto.
* rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
* mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
* mips-tdep.c (mips_gdbarch_init): Ditto.
* m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
* ia64-tdep.c (ia64_gdbarch_init): Ditto.
* hppa-tdep.c (hppa_gdbarch_init): Ditto.
* frv-tdep.c (frv_gdbarch_init): Ditto.
* avr-tdep.c (avr_gdbarch_init): Ditto.
* arm-tdep.c (arm_gdbarch_init): Ditto.
* vax-tdep.c (vax_frame_init_saved_regs): Replace FP_REGNUM with
DEPRECATED_FP_REGNUM.
(vax_push_dummy_frame, vax_pop_frame): Ditto.
* std-regs.c (value_of_builtin_frame_fp_reg): Ditto.
* sparc-tdep.c (sparc_init_extra_frame_info): Ditto.
(sparc_push_dummy_frame, sparc64_read_fp): Ditto.
(sparc32_register_virtual_type): Ditto.
* sh-tdep.c (sh64_frame_chain): Ditto.
(sh64_get_saved_register, sh64_pop_frame): Ditto.
(sh_nofp_frame_init_saved_regs): Ditto.
(sh64_nofp_frame_init_saved_regs): Ditto.
(sh_fp_frame_init_saved_regs): Ditto.
* remote-mips.c (mips_wait, mips_fetch_registers): Ditto.
* remote-e7000.c (fetch_regs_from_dump): Ditto.
* procfs.c (procfs_fetch_registers): Ditto.
(procfs_store_registers): Ditto.
* ns32knbsd-nat.c (fetch_inferior_registers): Ditto.
(store_inferior_registers, fetch_core_registers): Ditto.
(fetch_kcore_registers, clear_regs): Ditto.
* ns32k-tdep.c (ns32k_frame_init_saved_regs): Ditto.
(ns32k_push_dummy_frame, ns32k_pop_frame): Ditto.
* nlm/i386.h (DEPRECATED_FP_REGNUM): Ditto.
* nlm/i386.c (do_status): Ditto.
* mipsv4-nat.c (supply_gregset): Ditto.
* mips-tdep.c: Ditto for comments.
* mips-nat.c (fetch_inferior_registers): Ditto.
(store_inferior_registers, fetch_core_registers): Ditto.
* m68k-tdep.c (m68k_push_dummy_frame): Ditto.
(m68k_pop_frame, m68k_frame_init_saved_regs): Ditto.
* i386-tdep.c (i386_frame_init_saved_regs): Ditto.
(i386_do_pop_frame, i386_register_type): Ditto.
* hppa-tdep.c (hppa_frame_chain): Ditto.
(hppa_push_dummy_frame, find_dummy_frame_regs): Ditto.
(hppa_pop_frame, hppa_read_fp): Ditto.
(skip_prologue_hard_way, hppa_frame_find_saved_regs): Ditto.
* cris-tdep.c (cris_examine, cris_pop_frame): Ditto.
* config/vax/nm-vax.h (REGISTER_U_ADDR): Ditto.
* config/sparc/tm-sparc.h (DEPRECATED_FP_REGNUM): Ditto.
* config/sparc/tm-sp64.h (DEPRECATED_FP_REGNUM): Ditto.
* config/s390/tm-s390.h (DEPRECATED_FP_REGNUM): Ditto.
* config/pa/tm-hppa64.h (DEPRECATED_FP_REGNUM): Ditto.
* config/ia64/tm-ia64.h (DEPRECATED_FP_REGNUM): Ditto.
* blockframe.c: Ditto for comments.
* arch-utils.h: Ditto for comments.
* arch-utils.c (legacy_virtual_frame_pointer): Ditto.
* alphanbsd-tdep.c (fetch_core_registers): Ditto.
* alphabsd-nat.c (fetch_inferior_registers): Ditto.
* alpha-tdep.h: Ditto for comments.
* alpha-tdep.c (alpha_cannot_fetch_register): Ditto.
(alpha_cannot_store_register): Ditto.
(alpha_push_dummy_frame): Ditto.
* alpha-nat.c (supply_gregset): Ditto.
* config/sparc/tm-sp64.h (DEPRECATED_TARGET_READ_FP): Update.
* config/pa/tm-hppa64.h (DEPRECATED_TARGET_READ_FP): Update.
* config/sparc/tm-sparc.h: Update comment.
* hppa-tdep.c (hppa_init_extra_frame_info): Use
deprecated_read_fp instead of TARGET_READ_FP.
(hppa_init_extra_frame_info, hppa_frame_chain): Ditto.
(hppa_push_dummy_frame, hppa_read_fp): Ditto.
* sparc-tdep.c (sparc_init_extra_frame_info): Use
deprecated_read_fp instead of read_fp.
* s390-tdep.c (s390_push_arguments): Ditto.
* ia64-tdep.c (ia64_gdbarch_init): Ditto.
* frame.h: Ditto in comments.
* frame.c (legacy_get_prev_frame): Ditto.
* dummy-frame.c (dummy_frame_this_id): Ditto.
* arm-tdep.c (arm_init_extra_frame_info): Ditto.
2003-04-28 Andrew Cagney <cagney@redhat.com>
* gdbint.texinfo (Target Architecture Definition): Replace
read_fp, TARGET_READ_FP and FP_REGNUM, with deprecated_read_fp,
DEPRECATED_TARGET_READ_FP and DEPRECATED_REGNUM.
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r-- | gdb/gdbarch.c | 95 |
1 files changed, 55 insertions, 40 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 9808061..f773a09 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -147,7 +147,7 @@ struct gdbarch int char_signed; gdbarch_read_pc_ftype *read_pc; gdbarch_write_pc_ftype *write_pc; - gdbarch_read_fp_ftype *read_fp; + gdbarch_deprecated_target_read_fp_ftype *deprecated_target_read_fp; gdbarch_read_sp_ftype *read_sp; gdbarch_deprecated_dummy_write_sp_ftype *deprecated_dummy_write_sp; gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer; @@ -156,7 +156,7 @@ struct gdbarch int num_regs; int num_pseudo_regs; int sp_regnum; - int fp_regnum; + int deprecated_fp_regnum; int pc_regnum; int ps_regnum; int fp0_regnum; @@ -499,12 +499,11 @@ gdbarch_alloc (const struct gdbarch_info *info, current_gdbarch->char_signed = -1; current_gdbarch->read_pc = generic_target_read_pc; 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->virtual_frame_pointer = legacy_virtual_frame_pointer; current_gdbarch->num_regs = -1; current_gdbarch->sp_regnum = -1; - current_gdbarch->fp_regnum = -1; + current_gdbarch->deprecated_fp_regnum = -1; current_gdbarch->pc_regnum = -1; current_gdbarch->ps_regnum = -1; current_gdbarch->fp0_regnum = -1; @@ -622,7 +621,7 @@ verify_gdbarch (struct gdbarch *gdbarch) gdbarch->char_signed = 1; /* Skip verify of read_pc, invalid_p == 0 */ /* Skip verify of write_pc, invalid_p == 0 */ - /* Skip verify of read_fp, invalid_p == 0 */ + /* Skip verify of deprecated_target_read_fp, has predicate */ /* Skip verify of read_sp, invalid_p == 0 */ /* Skip verify of deprecated_dummy_write_sp, has predicate */ /* Skip verify of virtual_frame_pointer, invalid_p == 0 */ @@ -633,7 +632,7 @@ verify_gdbarch (struct gdbarch *gdbarch) fprintf_unfiltered (log, "\n\tnum_regs"); /* Skip verify of num_pseudo_regs, invalid_p == 0 */ /* Skip verify of sp_regnum, invalid_p == 0 */ - /* Skip verify of fp_regnum, invalid_p == 0 */ + /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */ /* Skip verify of pc_regnum, invalid_p == 0 */ /* Skip verify of ps_regnum, invalid_p == 0 */ /* Skip verify of fp0_regnum, invalid_p == 0 */ @@ -1145,6 +1144,14 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) "gdbarch_dump: DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED = %d\n", DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED); #endif +#ifdef DEPRECATED_FP_REGNUM + fprintf_unfiltered (file, + "gdbarch_dump: DEPRECATED_FP_REGNUM # %s\n", + XSTRING (DEPRECATED_FP_REGNUM)); + fprintf_unfiltered (file, + "gdbarch_dump: DEPRECATED_FP_REGNUM = %d\n", + DEPRECATED_FP_REGNUM); +#endif #ifdef DEPRECATED_FRAME_CHAIN_P fprintf_unfiltered (file, "gdbarch_dump: %s # %s\n", @@ -1511,6 +1518,26 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) (long) current_gdbarch->deprecated_store_struct_return /*DEPRECATED_STORE_STRUCT_RETURN ()*/); #endif +#ifdef DEPRECATED_TARGET_READ_FP_P + fprintf_unfiltered (file, + "gdbarch_dump: %s # %s\n", + "DEPRECATED_TARGET_READ_FP_P()", + XSTRING (DEPRECATED_TARGET_READ_FP_P ())); + fprintf_unfiltered (file, + "gdbarch_dump: DEPRECATED_TARGET_READ_FP_P() = %d\n", + DEPRECATED_TARGET_READ_FP_P ()); +#endif +#ifdef DEPRECATED_TARGET_READ_FP + fprintf_unfiltered (file, + "gdbarch_dump: %s # %s\n", + "DEPRECATED_TARGET_READ_FP()", + XSTRING (DEPRECATED_TARGET_READ_FP ())); + if (GDB_MULTI_ARCH) + fprintf_unfiltered (file, + "gdbarch_dump: DEPRECATED_TARGET_READ_FP = <0x%08lx>\n", + (long) current_gdbarch->deprecated_target_read_fp + /*DEPRECATED_TARGET_READ_FP ()*/); +#endif #ifdef DEPRECATED_USE_GENERIC_DUMMY_FRAMES fprintf_unfiltered (file, "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES # %s\n", @@ -1654,14 +1681,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) "gdbarch_dump: FP0_REGNUM = %d\n", FP0_REGNUM); #endif -#ifdef FP_REGNUM - fprintf_unfiltered (file, - "gdbarch_dump: FP_REGNUM # %s\n", - XSTRING (FP_REGNUM)); - fprintf_unfiltered (file, - "gdbarch_dump: FP_REGNUM = %d\n", - FP_REGNUM); -#endif #ifdef FRAMELESS_FUNCTION_INVOCATION fprintf_unfiltered (file, "gdbarch_dump: %s # %s\n", @@ -2501,17 +2520,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) "gdbarch_dump: TARGET_PTR_BIT = %d\n", TARGET_PTR_BIT); #endif -#ifdef TARGET_READ_FP - fprintf_unfiltered (file, - "gdbarch_dump: %s # %s\n", - "TARGET_READ_FP()", - XSTRING (TARGET_READ_FP ())); - if (GDB_MULTI_ARCH) - fprintf_unfiltered (file, - "gdbarch_dump: TARGET_READ_FP = <0x%08lx>\n", - (long) current_gdbarch->read_fp - /*TARGET_READ_FP ()*/); -#endif #ifdef TARGET_READ_PC fprintf_unfiltered (file, "gdbarch_dump: %s # %s\n", @@ -2880,23 +2888,30 @@ set_gdbarch_write_pc (struct gdbarch *gdbarch, gdbarch->write_pc = write_pc; } +int +gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch) +{ + gdb_assert (gdbarch != NULL); + return gdbarch->deprecated_target_read_fp != 0; +} + CORE_ADDR -gdbarch_read_fp (struct gdbarch *gdbarch) +gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch) { gdb_assert (gdbarch != NULL); - if (gdbarch->read_fp == 0) + if (gdbarch->deprecated_target_read_fp == 0) internal_error (__FILE__, __LINE__, - "gdbarch: gdbarch_read_fp invalid"); + "gdbarch: gdbarch_deprecated_target_read_fp invalid"); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_read_fp called\n"); - return gdbarch->read_fp (); + fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_target_read_fp called\n"); + return gdbarch->deprecated_target_read_fp (); } void -set_gdbarch_read_fp (struct gdbarch *gdbarch, - gdbarch_read_fp_ftype read_fp) +set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch, + gdbarch_deprecated_target_read_fp_ftype deprecated_target_read_fp) { - gdbarch->read_fp = read_fp; + gdbarch->deprecated_target_read_fp = deprecated_target_read_fp; } CORE_ADDR @@ -3069,20 +3084,20 @@ set_gdbarch_sp_regnum (struct gdbarch *gdbarch, } int -gdbarch_fp_regnum (struct gdbarch *gdbarch) +gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch) { gdb_assert (gdbarch != NULL); - /* Skip verify of fp_regnum, invalid_p == 0 */ + /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_fp_regnum called\n"); - return gdbarch->fp_regnum; + fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n"); + return gdbarch->deprecated_fp_regnum; } void -set_gdbarch_fp_regnum (struct gdbarch *gdbarch, - int fp_regnum) +set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch, + int deprecated_fp_regnum) { - gdbarch->fp_regnum = fp_regnum; + gdbarch->deprecated_fp_regnum = deprecated_fp_regnum; } int |