From: Andrew Cagney Date: Tue, 29 Apr 2003 01:49:49 +0000 (+0000) Subject: 2003-04-28 Andrew Cagney X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0ba6dca974b6df1fc1ac67608815cf5a2603856d;p=binutils-gdb.git 2003-04-28 Andrew Cagney * 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 * 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. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b585d95f89c..8753b2f6a9b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,133 @@ +2003-04-28 Andrew Cagney + + * 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 * gdbarch.sh (deprecated_tm_print_insn): Rename tm_print_insn. diff --git a/gdb/alpha-nat.c b/gdb/alpha-nat.c index 548869b2fa8..af0a336cf6a 100644 --- a/gdb/alpha-nat.c +++ b/gdb/alpha-nat.c @@ -212,7 +212,7 @@ supply_gregset (gdb_gregset_t *gregsetp) /* Fill inaccessible registers with zero. */ supply_register (ALPHA_ZERO_REGNUM, zerobuf); - supply_register (FP_REGNUM, zerobuf); + supply_register (DEPRECATED_FP_REGNUM, zerobuf); } void diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c index d694be5278f..067fc91fd63 100644 --- a/gdb/alpha-tdep.c +++ b/gdb/alpha-tdep.c @@ -293,13 +293,13 @@ alpha_register_name (int regno) static int alpha_cannot_fetch_register (int regno) { - return (regno == FP_REGNUM || regno == ALPHA_ZERO_REGNUM); + return (regno == DEPRECATED_FP_REGNUM || regno == ALPHA_ZERO_REGNUM); } static int alpha_cannot_store_register (int regno) { - return (regno == FP_REGNUM || regno == ALPHA_ZERO_REGNUM); + return (regno == DEPRECATED_FP_REGNUM || regno == ALPHA_ZERO_REGNUM); } static int @@ -1269,7 +1269,7 @@ alpha_push_dummy_frame (void) be read as zero and will help us to catch any errors in the dummy frame retrieval code. */ PROC_DUMMY_FRAME (proc_desc) = sp; - PROC_FRAME_REG (proc_desc) = FP_REGNUM; + PROC_FRAME_REG (proc_desc) = DEPRECATED_FP_REGNUM; PROC_FRAME_OFFSET (proc_desc) = 0; sp += PROC_REG_OFFSET (proc_desc); write_register (SP_REGNUM, sp); @@ -1806,7 +1806,7 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Register info */ set_gdbarch_num_regs (gdbarch, ALPHA_NUM_REGS); set_gdbarch_sp_regnum (gdbarch, ALPHA_SP_REGNUM); - set_gdbarch_fp_regnum (gdbarch, ALPHA_FP_REGNUM); + set_gdbarch_deprecated_fp_regnum (gdbarch, ALPHA_FP_REGNUM); set_gdbarch_pc_regnum (gdbarch, ALPHA_PC_REGNUM); set_gdbarch_fp0_regnum (gdbarch, ALPHA_FP0_REGNUM); diff --git a/gdb/alpha-tdep.h b/gdb/alpha-tdep.h index 76f91f32bf4..0e8aefbfe16 100644 --- a/gdb/alpha-tdep.h +++ b/gdb/alpha-tdep.h @@ -40,12 +40,12 @@ /* Largest value REGISTER_VIRTUAL_SIZE can have. */ #define ALPHA_MAX_REGISTER_VIRTUAL_SIZE 8 -/* Register numbers of various important registers. - Note that most of these values are "real" register numbers, - and correspond to the general registers of the machine, - and FP_REGNUM is a "phony" register number which is too large - to be an actual register number as far as the user is concerned - but serves to get the desired value when passed to read_register. */ +/* Register numbers of various important registers. Note that most of + these values are "real" register numbers, and correspond to the + general registers of the machine, and DEPRECATED_FP_REGNUM is a + "phony" register number which is too large to be an actual register + number as far as the user is concerned but serves to get the + desired value when passed to read_register. */ #define ALPHA_V0_REGNUM 0 /* Function integer return value */ #define ALPHA_T7_REGNUM 8 /* Return address register for OSF/1 __add* */ diff --git a/gdb/alphabsd-nat.c b/gdb/alphabsd-nat.c index b26d3ea7c48..a20b36f575e 100644 --- a/gdb/alphabsd-nat.c +++ b/gdb/alphabsd-nat.c @@ -113,7 +113,7 @@ fetch_inferior_registers (int regno) } /* Reset virtual frame pointer. */ - supply_register (FP_REGNUM, NULL); + supply_register (DEPRECATED_FP_REGNUM, NULL); } /* Store register REGNO back into the inferior. If REGNO is -1, do diff --git a/gdb/alphanbsd-tdep.c b/gdb/alphanbsd-tdep.c index 6137c5e98de..a4a77c1c00c 100644 --- a/gdb/alphanbsd-tdep.c +++ b/gdb/alphanbsd-tdep.c @@ -70,7 +70,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which, for (regno = 0; regno < ALPHA_ZERO_REGNUM; regno++) supply_register (regno, regs + (regmap[regno] * 8)); supply_register (ALPHA_ZERO_REGNUM, NULL); - supply_register (FP_REGNUM, NULL); + supply_register (DEPRECATED_FP_REGNUM, NULL); supply_register (PC_REGNUM, regs + (28 * 8)); /* Floating point registers. */ diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c index 7a4a1db9c53..fad8ed1b366 100644 --- a/gdb/arch-utils.c +++ b/gdb/arch-utils.c @@ -410,7 +410,8 @@ cannot_register_not (int regnum) } /* Legacy version of target_virtual_frame_pointer(). Assumes that - there is an FP_REGNUM and that it is the same, cooked or raw. */ + there is an DEPRECATED_FP_REGNUM and that it is the same, cooked or + raw. */ void legacy_virtual_frame_pointer (CORE_ADDR pc, @@ -422,8 +423,8 @@ legacy_virtual_frame_pointer (CORE_ADDR pc, register and an offset can determine this. I think it should instead generate a byte code expression as that would work better with things like Dwarf2's CFI. */ - if (FP_REGNUM >= 0 && FP_REGNUM < NUM_REGS) - *frame_regnum = FP_REGNUM; + if (DEPRECATED_FP_REGNUM >= 0 && DEPRECATED_FP_REGNUM < NUM_REGS) + *frame_regnum = DEPRECATED_FP_REGNUM; else if (SP_REGNUM >= 0 && SP_REGNUM < NUM_REGS) *frame_regnum = SP_REGNUM; else diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h index f3874a0c250..cf515a4f76d 100644 --- a/gdb/arch-utils.h +++ b/gdb/arch-utils.h @@ -141,7 +141,8 @@ void default_coff_make_msymbol_special (int val, struct minimal_symbol *msym); int cannot_register_not (int regnum); /* Legacy version of target_virtual_frame_pointer(). Assumes that - there is an FP_REGNUM and that it is the same, cooked or raw. */ + there is an DEPRECATED_FP_REGNUM and that it is the same, cooked or + raw. */ extern gdbarch_virtual_frame_pointer_ftype legacy_virtual_frame_pointer; diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index f104952a551..ee07a36282c 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -1118,7 +1118,7 @@ arm_init_extra_frame_info (int fromleaf, struct frame_info *fi) else if (fromleaf) /* If we were called by a frameless fn. then our frame is still in the frame pointer register on the board... */ - deprecated_update_frame_base_hack (fi, read_fp ()); + deprecated_update_frame_base_hack (fi, deprecated_read_fp ()); } /* Calculate actual addresses of saved registers using offsets @@ -2938,7 +2938,7 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Frame handling. */ set_gdbarch_deprecated_frame_chain_valid (gdbarch, arm_frame_chain_valid); set_gdbarch_deprecated_init_extra_frame_info (gdbarch, arm_init_extra_frame_info); - set_gdbarch_read_fp (gdbarch, arm_read_fp); + set_gdbarch_deprecated_target_read_fp (gdbarch, arm_read_fp); set_gdbarch_deprecated_frame_chain (gdbarch, arm_frame_chain); set_gdbarch_frameless_function_invocation (gdbarch, arm_frameless_function_invocation); @@ -2972,7 +2972,7 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Information about registers, etc. */ set_gdbarch_print_float_info (gdbarch, arm_print_float_info); - set_gdbarch_fp_regnum (gdbarch, ARM_FP_REGNUM); /* ??? */ + set_gdbarch_deprecated_fp_regnum (gdbarch, ARM_FP_REGNUM); /* ??? */ set_gdbarch_sp_regnum (gdbarch, ARM_SP_REGNUM); set_gdbarch_pc_regnum (gdbarch, ARM_PC_REGNUM); set_gdbarch_register_byte (gdbarch, arm_register_byte); diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c index 16a21297e0a..314c0a11977 100644 --- a/gdb/avr-tdep.c +++ b/gdb/avr-tdep.c @@ -1145,14 +1145,14 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_read_pc (gdbarch, avr_read_pc); set_gdbarch_write_pc (gdbarch, avr_write_pc); - set_gdbarch_read_fp (gdbarch, avr_read_fp); + set_gdbarch_deprecated_target_read_fp (gdbarch, avr_read_fp); set_gdbarch_read_sp (gdbarch, avr_read_sp); set_gdbarch_deprecated_dummy_write_sp (gdbarch, avr_write_sp); set_gdbarch_num_regs (gdbarch, AVR_NUM_REGS); set_gdbarch_sp_regnum (gdbarch, AVR_SP_REGNUM); - set_gdbarch_fp_regnum (gdbarch, AVR_FP_REGNUM); + set_gdbarch_deprecated_fp_regnum (gdbarch, AVR_FP_REGNUM); set_gdbarch_pc_regnum (gdbarch, AVR_PC_REGNUM); set_gdbarch_register_name (gdbarch, avr_register_name); diff --git a/gdb/blockframe.c b/gdb/blockframe.c index 47e576e8211..fce25e469a7 100644 --- a/gdb/blockframe.c +++ b/gdb/blockframe.c @@ -523,14 +523,14 @@ block_innermost_frame (struct block *block) top of the stack frame which we are checking, where "bottom" and "top" refer to some section of memory which contains the code for the call dummy. Calls to this macro assume that the contents of - SP_REGNUM and FP_REGNUM (or the saved values thereof), respectively, - are the things to pass. - - This won't work on the 29k, where SP_REGNUM and FP_REGNUM don't - have that meaning, but the 29k doesn't use ON_STACK. This could be - fixed by generalizing this scheme, perhaps by passing in a frame - and adding a few fields, at least on machines which need them for - DEPRECATED_PC_IN_CALL_DUMMY. + SP_REGNUM and DEPRECATED_FP_REGNUM (or the saved values thereof), + respectively, are the things to pass. + + This won't work on the 29k, where SP_REGNUM and + DEPRECATED_FP_REGNUM don't have that meaning, but the 29k doesn't + use ON_STACK. This could be fixed by generalizing this scheme, + perhaps by passing in a frame and adding a few fields, at least on + machines which need them for DEPRECATED_PC_IN_CALL_DUMMY. Something simpler, like checking for the stack segment, doesn't work, since various programs (threads implementations, gcc nested function diff --git a/gdb/config/ia64/tm-ia64.h b/gdb/config/ia64/tm-ia64.h index 9ebe9ae7a9a..dc36127e3cd 100644 --- a/gdb/config/ia64/tm-ia64.h +++ b/gdb/config/ia64/tm-ia64.h @@ -40,7 +40,7 @@ #define PC_REGNUM IA64_IP_REGNUM #define SP_REGNUM IA64_GR12_REGNUM -#define FP_REGNUM IA64_VFP_REGNUM +#define DEPRECATED_FP_REGNUM IA64_VFP_REGNUM /* Total amount of space needed to store our copies of the machine's register state, the array `registers'. On the ia64, all registers diff --git a/gdb/config/pa/tm-hppa64.h b/gdb/config/pa/tm-hppa64.h index 48d41d355f4..17f40aab37d 100644 --- a/gdb/config/pa/tm-hppa64.h +++ b/gdb/config/pa/tm-hppa64.h @@ -119,7 +119,7 @@ extern CORE_ADDR hppa_stack_align (CORE_ADDR sp); #endif #if !GDB_MULTI_ARCH -#define FP_REGNUM 3 /* Contains address of executing stack */ +#define DEPRECATED_FP_REGNUM 3 /* Contains address of executing stack */ /* frame */ #endif #if !GDB_MULTI_ARCH @@ -342,7 +342,7 @@ extern void hppa_target_write_pc (CORE_ADDR, ptid_t); #endif #if !GDB_MULTI_ARCH -#define TARGET_READ_FP() hppa_target_read_fp () +#define DEPRECATED_TARGET_READ_FP() hppa_target_read_fp () extern CORE_ADDR hppa_target_read_fp (void); #endif diff --git a/gdb/config/s390/tm-s390.h b/gdb/config/s390/tm-s390.h index 1c6e6787099..2bb4c2d2c30 100644 --- a/gdb/config/s390/tm-s390.h +++ b/gdb/config/s390/tm-s390.h @@ -80,7 +80,7 @@ int s390_register_byte (int reg_nr); #define PC_REGNUM S390_PC_REGNUM #define NUM_REGS S390_NUM_REGS #define NUM_FREGS S390_NUM_FPRS -#define FP_REGNUM S390_FP_REGNUM +#define DEPRECATED_FP_REGNUM S390_FP_REGNUM #define SP_REGNUM S390_SP_REGNUM /* Obviously ptrace for user program tracing cannot be allowed mess with control registers (except per registers for hardware watchpoints), diff --git a/gdb/config/sparc/tm-sp64.h b/gdb/config/sparc/tm-sp64.h index 2d2193d207f..f46d45915c1 100644 --- a/gdb/config/sparc/tm-sp64.h +++ b/gdb/config/sparc/tm-sp64.h @@ -269,7 +269,7 @@ extern CORE_ADDR sparc64_read_fp (); extern void sparc64_write_sp (CORE_ADDR); #define TARGET_READ_SP() (sparc64_read_sp ()) -#define TARGET_READ_FP() (sparc64_read_fp ()) +#define DEPRECATED_TARGET_READ_FP() (sparc64_read_fp ()) #define DEPRECATED_DUMMY_WRITE_SP(X) (sparc64_write_sp (X)) #undef DEPRECATED_EXTRACT_RETURN_VALUE @@ -297,7 +297,7 @@ extern void sp64_extract_return_value (struct type *, char[], char *, int); #define L0_REGNUM 16 /* First local reg that's saved on stack frame rather than in machine registers */ #define I0_REGNUM 24 /* %i0 */ -#define FP_REGNUM 30 /* Contains address of executing stack frame */ +#define DEPRECATED_FP_REGNUM 30 /* Contains address of executing stack frame */ #define I7_REGNUM 31 /* Last local reg saved on stack frame */ #define FP0_REGNUM 32 /* Floating point register 0 */ #endif diff --git a/gdb/config/sparc/tm-sparc.h b/gdb/config/sparc/tm-sparc.h index 7641ee1c5f4..e997babd75b 100644 --- a/gdb/config/sparc/tm-sparc.h +++ b/gdb/config/sparc/tm-sparc.h @@ -182,7 +182,7 @@ extern int sparc_intreg_size (void); #define SP_REGNUM 14 /* Contains address of top of stack, \ which is also the bottom of the frame. */ -#define FP_REGNUM 30 /* Contains address of executing stack frame */ +#define DEPRECATED_FP_REGNUM 30 /* Contains address of executing stack frame */ #define FP0_REGNUM 32 /* Floating point register 0 */ @@ -201,8 +201,9 @@ extern int sparc_intreg_size (void); remove the ins and locals from `registers', make sure that frame_register() can get them from the stack (even in the innermost frame), and make this the way to access them. For the frame - pointer we would do that via TARGET_READ_FP. On the other hand, - that is likely to be confusing or worse for flat frames. */ + pointer we would do that via DEPRECATED_TARGET_READ_FP. On the + other hand, that is likely to be confusing or worse for flat + frames. */ #define REGISTER_BYTES (32*4+32*4+8*4) diff --git a/gdb/config/vax/nm-vax.h b/gdb/config/vax/nm-vax.h index efebd6b8936..2518047290f 100644 --- a/gdb/config/vax/nm-vax.h +++ b/gdb/config/vax/nm-vax.h @@ -24,6 +24,6 @@ { addr = blockend - 0110 + regno * 4; \ if (regno == PC_REGNUM) addr = blockend - 8; \ if (regno == PS_REGNUM) addr = blockend - 4; \ - if (regno == FP_REGNUM) addr = blockend - 0120; \ + if (regno == DEPRECATED_FP_REGNUM) addr = blockend - 0120; \ if (regno == AP_REGNUM) addr = blockend - 0124; \ if (regno == SP_REGNUM) addr = blockend - 20; } diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c index c3ebe4d08c6..a963d21616f 100644 --- a/gdb/cris-tdep.c +++ b/gdb/cris-tdep.c @@ -53,7 +53,7 @@ enum cris_num_regs }; /* Register numbers of various important registers. - FP_REGNUM Contains address of executing stack frame. + DEPRECATED_FP_REGNUM Contains address of executing stack frame. STR_REGNUM Contains the address of structure return values. RET_REGNUM Contains the return value when shorter than or equal to 32 bits ARG1_REGNUM Contains the first parameter to a function. @@ -65,8 +65,8 @@ enum cris_num_regs SRP_REGNUM Subroutine return pointer register. BRP_REGNUM Breakpoint return pointer register. */ -/* FP_REGNUM = 8, SP_REGNUM = 14, and PC_REGNUM = 15 have been incorporated - into the multi-arch framework. */ +/* DEPRECATED_FP_REGNUM = 8, SP_REGNUM = 14, and PC_REGNUM = 15 have + been incorporated into the multi-arch framework. */ enum cris_regnums { @@ -529,7 +529,7 @@ cris_examine (CORE_ADDR ip, CORE_ADDR limit, struct frame_info *fi, } get_frame_extra_info (fi)->leaf_function = 0; } - else if (regno == FP_REGNUM) + else if (regno == DEPRECATED_FP_REGNUM) { have_fp = 1; } @@ -616,7 +616,7 @@ cris_examine (CORE_ADDR ip, CORE_ADDR limit, struct frame_info *fi, break; } } - else if (cris_get_operand2 (insn) == FP_REGNUM + else if (cris_get_operand2 (insn) == DEPRECATED_FP_REGNUM /* The size is a fixed-size. */ && ((insn & 0x0F00) >> 8) == 0x0001 /* A negative offset. */ @@ -640,7 +640,7 @@ cris_examine (CORE_ADDR ip, CORE_ADDR limit, struct frame_info *fi, break; } } - else if (cris_get_operand2 (insn) == FP_REGNUM + else if (cris_get_operand2 (insn) == DEPRECATED_FP_REGNUM /* The size is a fixed-size. */ && ((insn & 0x0F00) >> 8) == 0x0001 /* A positive offset. */ @@ -681,7 +681,7 @@ cris_examine (CORE_ADDR ip, CORE_ADDR limit, struct frame_info *fi, if (have_fp) { - get_frame_saved_regs (fi)[FP_REGNUM] = get_frame_base (fi); + get_frame_saved_regs (fi)[DEPRECATED_FP_REGNUM] = get_frame_base (fi); /* Calculate the addresses. */ for (regno = regsave; regno >= 0; regno--) @@ -1536,7 +1536,7 @@ cris_pop_frame (void) /* Restore general registers R0 - R7. They were pushed on the stack after SP was saved. */ - for (regno = 0; regno < FP_REGNUM; regno++) + for (regno = 0; regno < DEPRECATED_FP_REGNUM; regno++) { if (get_frame_saved_regs (fi)[regno]) { @@ -1545,12 +1545,12 @@ cris_pop_frame (void) } } - if (get_frame_saved_regs (fi)[FP_REGNUM]) + if (get_frame_saved_regs (fi)[DEPRECATED_FP_REGNUM]) { /* Pop the frame pointer (R8). It was pushed before SP was saved. */ - write_register (FP_REGNUM, - read_memory_integer (get_frame_saved_regs (fi)[FP_REGNUM], 4)); + write_register (DEPRECATED_FP_REGNUM, + read_memory_integer (get_frame_saved_regs (fi)[DEPRECATED_FP_REGNUM], 4)); stack_offset += 4; /* Not a leaf function. */ @@ -1561,7 +1561,7 @@ cris_pop_frame (void) } /* Restore the SP and adjust for R8 and (possibly) SRP. */ - write_register (SP_REGNUM, get_frame_saved_regs (fi)[FP_REGNUM] + stack_offset); + write_register (SP_REGNUM, get_frame_saved_regs (fi)[DEPRECATED_FP_REGNUM] + stack_offset); } else { @@ -4182,7 +4182,7 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* There are 32 registers (some of which may not be implemented). */ set_gdbarch_num_regs (gdbarch, 32); set_gdbarch_sp_regnum (gdbarch, 14); - set_gdbarch_fp_regnum (gdbarch, 8); + set_gdbarch_deprecated_fp_regnum (gdbarch, 8); set_gdbarch_pc_regnum (gdbarch, 15); set_gdbarch_register_name (gdbarch, cris_register_name); diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c index bb62862edf2..93236a350fe 100644 --- a/gdb/d10v-tdep.c +++ b/gdb/d10v-tdep.c @@ -102,8 +102,6 @@ extern void _initialize_d10v_tdep (void); static CORE_ADDR d10v_read_sp (void); -static CORE_ADDR d10v_read_fp (void); - static void d10v_eva_prepare_to_trace (void); static void d10v_eva_get_trace_data (void); @@ -918,12 +916,6 @@ d10v_read_sp (void) return (d10v_make_daddr (read_register (D10V_SP_REGNUM))); } -static CORE_ADDR -d10v_read_fp (void) -{ - return (d10v_make_daddr (read_register (D10V_FP_REGNUM))); -} - /* When arguments must be pushed onto the stack, they go on in reverse order. The below implements a FILO (stack) to do this. */ @@ -1584,7 +1576,6 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_read_pc (gdbarch, d10v_read_pc); set_gdbarch_write_pc (gdbarch, d10v_write_pc); - set_gdbarch_read_fp (gdbarch, d10v_read_fp); set_gdbarch_read_sp (gdbarch, d10v_read_sp); set_gdbarch_num_regs (gdbarch, d10v_num_regs); diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index e42448c3016..7433c5895b6 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,9 @@ +2003-04-28 Andrew Cagney + + * 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. + 2003-04-28 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Rename diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo index 3a82c91bffc..c99d7895fb6 100644 --- a/gdb/doc/gdbint.texinfo +++ b/gdb/doc/gdbint.texinfo @@ -241,16 +241,17 @@ machine-independent part of @value{GDBN}, except that it is used when setting up a new frame from scratch, as follows: @smallexample -create_new_frame (read_register (FP_REGNUM), read_pc ())); +create_new_frame (read_register (DEPRECATED_FP_REGNUM), read_pc ())); @end smallexample @cindex frame pointer register -Other than that, all the meaning imparted to @code{FP_REGNUM} is -imparted by the machine-dependent code. So, @code{FP_REGNUM} can have -any value that is convenient for the code that creates new frames. -(@code{create_new_frame} calls @code{DEPRECATED_INIT_EXTRA_FRAME_INFO} -if it is defined; that is where you should use the @code{FP_REGNUM} -value, if your frames are nonstandard.) +Other than that, all the meaning imparted to @code{DEPRECATED_FP_REGNUM} +is imparted by the machine-dependent code. So, +@code{DEPRECATED_FP_REGNUM} can have any value that is convenient for +the code that creates new frames. (@code{create_new_frame} calls +@code{DEPRECATED_INIT_EXTRA_FRAME_INFO} if it is defined; that is where +you should use the @code{DEPRECATED_FP_REGNUM} value, if your frames are +nonstandard.) @cindex frame chain Given a @value{GDBN} frame, define @code{DEPRECATED_FRAME_CHAIN} to @@ -3217,13 +3218,13 @@ If not defined, @code{EXTRACT_RETURN_VALUE} is used. @findex EXTRACT_STRUCT_VALUE_ADDRESS_P Predicate for @code{EXTRACT_STRUCT_VALUE_ADDRESS}. -@item FP_REGNUM -@findex FP_REGNUM +@item DEPRECATED_FP_REGNUM +@findex DEPRECATED_FP_REGNUM If the virtual frame 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_READ_FP} is not -defined. +This should only need to be defined if @code{DEPRECATED_TARGET_READ_FP} +is not defined. @item FRAMELESS_FUNCTION_INVOCATION(@var{fi}) @findex FRAMELESS_FUNCTION_INVOCATION @@ -3882,9 +3883,9 @@ Number of bits in a short integer; defaults to @code{2 * TARGET_CHAR_BIT}. @findex read_sp @findex read_fp These change the behavior of @code{read_pc}, @code{write_pc}, -@code{read_sp} and @code{read_fp}. For most targets, these may be left -undefined. @value{GDBN} will call the read and write register functions -with the relevant @code{_REGNUM} argument. +@code{read_sp} and @code{deprecated_read_fp}. For most targets, these +may be left undefined. @value{GDBN} will call the read and write +register functions with the relevant @code{_REGNUM} argument. These macros are useful when a target keeps one of these registers in a hard to get at place; for example, part in a segment register and part @@ -3892,10 +3893,10 @@ in an ordinary register. @item TARGET_VIRTUAL_FRAME_POINTER(@var{pc}, @var{regp}, @var{offsetp}) @findex TARGET_VIRTUAL_FRAME_POINTER -Returns a @code{(register, offset)} pair representing the virtual -frame pointer in use at the code address @var{pc}. If virtual -frame pointers are not used, a default definition simply returns -@code{FP_REGNUM}, with an offset of zero. +Returns a @code{(register, offset)} pair representing the virtual frame +pointer in use at the code address @var{pc}. If virtual frame pointers +are not used, a default definition simply returns +@code{DEPRECATED_FP_REGNUM}, with an offset of zero. @item TARGET_HAS_HARDWARE_WATCHPOINTS If non-zero, the target has support for hardware-assisted diff --git a/gdb/dummy-frame.c b/gdb/dummy-frame.c index a320b7d3b9f..7f3b2a2edc1 100644 --- a/gdb/dummy-frame.c +++ b/gdb/dummy-frame.c @@ -374,7 +374,7 @@ dummy_frame_this_id (struct frame_info *next_frame, same sequence as is found a traditional unwinder. Once all architectures supply the unwind_dummy_id method, this code can go away. */ - (*this_id) = frame_id_build (read_fp (), read_pc ()); + (*this_id) = frame_id_build (deprecated_read_fp (), read_pc ()); } else if (legacy_frame_p (current_gdbarch) && get_prev_frame (next_frame)) diff --git a/gdb/frame.c b/gdb/frame.c index 5f1b39ed955..4af3d6c5474 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -1386,7 +1386,8 @@ legacy_get_prev_frame (struct frame_info *this_frame) using the same sequence as is found a traditional unwinder. Once all architectures supply the unwind_dummy_id method, this code can go away. */ - prev->this_id.value = frame_id_build (read_fp (), read_pc ()); + prev->this_id.value = frame_id_build (deprecated_read_fp (), + read_pc ()); } /* Check that the unwound ID is valid. */ @@ -1541,8 +1542,9 @@ legacy_get_prev_frame (struct frame_info *this_frame) DEPRECATED_INIT_EXTRA_FRAME_INFO, one possible scheme: SETUP_INNERMOST_FRAME(): Default version is just create_new_frame - (read_fp ()), read_pc ()). Machines with extra frame info would - do that (or the local equivalent) and then set the extra fields. + (deprecated_read_fp ()), read_pc ()). Machines with extra frame + info would do that (or the local equivalent) and then set the + extra fields. SETUP_ARBITRARY_FRAME(argc, argv): Only change here is that create_new_frame would no longer init extra frame info; diff --git a/gdb/frame.h b/gdb/frame.h index b4db944c9e7..cb629d995c0 100644 --- a/gdb/frame.h +++ b/gdb/frame.h @@ -557,9 +557,9 @@ extern void deprecated_update_frame_pc_hack (struct frame_info *frame, /* FIXME: cagney/2002-12-18: Has the frame's base changed? Or to be more exact, whas that initial guess at the frame's base as returned - by read_fp() wrong. If it was, fix it. This shouldn't be - necessary since the code should be getting the frame's base correct - from the outset. + by deprecated_read_fp() wrong. If it was, fix it. This shouldn't + be necessary since the code should be getting the frame's base + correct from the outset. This replaced: frame->frame = ....; */ extern void deprecated_update_frame_base_hack (struct frame_info *frame, diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c index 90cf4f33143..d45a76d3eb1 100644 --- a/gdb/frv-tdep.c +++ b/gdb/frv-tdep.c @@ -1053,7 +1053,7 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_num_regs (gdbarch, frv_num_regs); set_gdbarch_sp_regnum (gdbarch, sp_regnum); - set_gdbarch_fp_regnum (gdbarch, fp_regnum); + set_gdbarch_deprecated_fp_regnum (gdbarch, fp_regnum); set_gdbarch_pc_regnum (gdbarch, pc_regnum); set_gdbarch_register_name (gdbarch, frv_register_name); @@ -1101,7 +1101,6 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_read_pc (gdbarch, generic_target_read_pc); 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_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp); diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 98080613ffe..f773a0933c4 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 diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index a8a63ebc04d..2f02b4ff3ed 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -345,20 +345,43 @@ extern void set_gdbarch_write_pc (struct gdbarch *gdbarch, gdbarch_write_pc_ftyp #endif #endif +/* This is simply not needed. See value_of_builtin_frame_fp_reg and + call_function_by_hand. */ + +#if defined (DEPRECATED_TARGET_READ_FP) +/* Legacy for systems yet to multi-arch DEPRECATED_TARGET_READ_FP */ +#if !defined (DEPRECATED_TARGET_READ_FP_P) +#define DEPRECATED_TARGET_READ_FP_P() (1) +#endif +#endif + +/* Default predicate for non- multi-arch targets. */ +#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_TARGET_READ_FP_P) +#define DEPRECATED_TARGET_READ_FP_P() (0) +#endif + +extern int gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_TARGET_READ_FP_P) +#error "Non multi-arch definition of DEPRECATED_TARGET_READ_FP" +#endif +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_TARGET_READ_FP_P) +#define DEPRECATED_TARGET_READ_FP_P() (gdbarch_deprecated_target_read_fp_p (current_gdbarch)) +#endif + /* Default (function) for non- multi-arch platforms. */ -#if (!GDB_MULTI_ARCH) && !defined (TARGET_READ_FP) -#define TARGET_READ_FP() (generic_target_read_fp ()) +#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_TARGET_READ_FP) +#define DEPRECATED_TARGET_READ_FP() (internal_error (__FILE__, __LINE__, "DEPRECATED_TARGET_READ_FP"), 0) #endif -typedef CORE_ADDR (gdbarch_read_fp_ftype) (void); -extern CORE_ADDR gdbarch_read_fp (struct gdbarch *gdbarch); -extern void set_gdbarch_read_fp (struct gdbarch *gdbarch, gdbarch_read_fp_ftype *read_fp); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_FP) -#error "Non multi-arch definition of TARGET_READ_FP" +typedef CORE_ADDR (gdbarch_deprecated_target_read_fp_ftype) (void); +extern CORE_ADDR gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch); +extern void set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch, gdbarch_deprecated_target_read_fp_ftype *deprecated_target_read_fp); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_TARGET_READ_FP) +#error "Non multi-arch definition of DEPRECATED_TARGET_READ_FP" #endif #if GDB_MULTI_ARCH -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_READ_FP) -#define TARGET_READ_FP() (gdbarch_read_fp (current_gdbarch)) +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_TARGET_READ_FP) +#define DEPRECATED_TARGET_READ_FP() (gdbarch_deprecated_target_read_fp (current_gdbarch)) #endif #endif @@ -503,19 +526,22 @@ extern void set_gdbarch_sp_regnum (struct gdbarch *gdbarch, int sp_regnum); #endif #endif +/* This is simply not needed. See value_of_builtin_frame_fp_reg and + call_function_by_hand. */ + /* Default (value) for non- multi-arch platforms. */ -#if (!GDB_MULTI_ARCH) && !defined (FP_REGNUM) -#define FP_REGNUM (-1) +#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FP_REGNUM) +#define DEPRECATED_FP_REGNUM (-1) #endif -extern int gdbarch_fp_regnum (struct gdbarch *gdbarch); -extern void set_gdbarch_fp_regnum (struct gdbarch *gdbarch, int fp_regnum); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FP_REGNUM) -#error "Non multi-arch definition of FP_REGNUM" +extern int gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch); +extern void set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch, int deprecated_fp_regnum); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FP_REGNUM) +#error "Non multi-arch definition of DEPRECATED_FP_REGNUM" #endif #if GDB_MULTI_ARCH -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FP_REGNUM) -#define FP_REGNUM (gdbarch_fp_regnum (current_gdbarch)) +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FP_REGNUM) +#define DEPRECATED_FP_REGNUM (gdbarch_deprecated_fp_regnum (current_gdbarch)) #endif #endif diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 129e09aaff9..f62687a29d7 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -428,7 +428,9 @@ v:2:TARGET_CHAR_SIGNED:int:char_signed::::1:-1:1:::: # f:2:TARGET_READ_PC:CORE_ADDR:read_pc:ptid_t ptid:ptid::0:generic_target_read_pc::0 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 +# This is simply not needed. See value_of_builtin_frame_fp_reg and +# call_function_by_hand. +F::DEPRECATED_TARGET_READ_FP:CORE_ADDR:deprecated_target_read_fp:void f:2:TARGET_READ_SP:CORE_ADDR:read_sp:void:::0:generic_target_read_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 @@ -451,7 +453,9 @@ v:2:NUM_PSEUDO_REGS:int:num_pseudo_regs::::0:0::0::: # a real register or a pseudo (computed) register or not be defined at # all (-1). v:2:SP_REGNUM:int:sp_regnum::::-1:-1::0 -v:2:FP_REGNUM:int:fp_regnum::::-1:-1::0 +# This is simply not needed. See value_of_builtin_frame_fp_reg and +# call_function_by_hand. +v:2:DEPRECATED_FP_REGNUM:int:deprecated_fp_regnum::::-1:-1::0 v:2:PC_REGNUM:int:pc_regnum::::-1:-1::0 v:2:PS_REGNUM:int:ps_regnum::::-1:-1::0 v:2:FP0_REGNUM:int:fp0_regnum::::0:-1::0 diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 63ec899245a..9df8a2a4807 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,8 @@ +2003-04-24 Andrew Cagney + + * low-nbsd.c (fetch_inferior_registers): + (store_inferior_registers): + 2003-03-26 Daniel Jacobowitz * linux-low.c (linux_create_inferior): Use __SIGRTMIN. diff --git a/gdb/gdbserver/low-nbsd.c b/gdb/gdbserver/low-nbsd.c index 9046d635604..8bec0d98e57 100644 --- a/gdb/gdbserver/low-nbsd.c +++ b/gdb/gdbserver/low-nbsd.c @@ -394,7 +394,7 @@ fetch_inferior_registers (int regno) RF (R0_REGNUM + 7, inferior_registers.r_r7); RF (SP_REGNUM, inferior_registers.r_sp); - RF (FP_REGNUM, inferior_registers.r_fp); + RF (DEPRECATED_FP_REGNUM, inferior_registers.r_fp); RF (PC_REGNUM, inferior_registers.r_pc); RF (PS_REGNUM, inferior_registers.r_psr); @@ -429,7 +429,7 @@ store_inferior_registers (int regno) RS (R0_REGNUM + 7, inferior_registers.r_r7); RS (SP_REGNUM, inferior_registers.r_sp); - RS (FP_REGNUM, inferior_registers.r_fp); + RS (DEPRECATED_FP_REGNUM, inferior_registers.r_fp); RS (PC_REGNUM, inferior_registers.r_pc); RS (PS_REGNUM, inferior_registers.r_psr); diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c index f1ab95c494b..614bc813e31 100644 --- a/gdb/h8300-tdep.c +++ b/gdb/h8300-tdep.c @@ -1101,7 +1101,7 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_num_regs (gdbarch, E_NUM_REGS); set_gdbarch_num_pseudo_regs (gdbarch, 0); set_gdbarch_sp_regnum (gdbarch, E_SP_REGNUM); - set_gdbarch_fp_regnum (gdbarch, E_FP_REGNUM); + set_gdbarch_deprecated_fp_regnum (gdbarch, E_FP_REGNUM); set_gdbarch_pc_regnum (gdbarch, E_PC_REGNUM); set_gdbarch_register_name (gdbarch, h8300_register_name); set_gdbarch_register_size (gdbarch, BINWORD); diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index 4c60c24380e..db761ac59e4 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c @@ -1085,7 +1085,7 @@ hppa_init_extra_frame_info (int fromleaf, struct frame_info *frame) frame. (we always want frame->frame to point at the lowest address in the frame). */ if (framesize == -1) - deprecated_update_frame_base_hack (frame, TARGET_READ_FP ()); + deprecated_update_frame_base_hack (frame, deprecated_read_fp ()); else deprecated_update_frame_base_hack (frame, get_frame_base (frame) - framesize); return; @@ -1106,7 +1106,7 @@ hppa_init_extra_frame_info (int fromleaf, struct frame_info *frame) sorts, and its base is the high address in its parent's frame. */ framesize = find_proc_framesize (get_frame_pc (frame)); if (framesize == -1) - deprecated_update_frame_base_hack (frame, TARGET_READ_FP ()); + deprecated_update_frame_base_hack (frame, deprecated_read_fp ()); else deprecated_update_frame_base_hack (frame, read_register (SP_REGNUM) - framesize); } @@ -1264,7 +1264,7 @@ hppa_frame_chain (struct frame_info *frame) saved_regs_frame = tmp_frame; /* If we have an address for r3, that's good. */ - if (saved_regs[FP_REGNUM]) + if (saved_regs[DEPRECATED_FP_REGNUM]) break; } } @@ -1326,7 +1326,7 @@ hppa_frame_chain (struct frame_info *frame) u = find_unwind_entry (DEPRECATED_FRAME_SAVED_PC (frame)); if (!u) { - return read_memory_integer (saved_regs[FP_REGNUM], + return read_memory_integer (saved_regs[DEPRECATED_FP_REGNUM], TARGET_PTR_BIT / 8); } else @@ -1335,7 +1335,7 @@ hppa_frame_chain (struct frame_info *frame) } } - return read_memory_integer (saved_regs[FP_REGNUM], + return read_memory_integer (saved_regs[DEPRECATED_FP_REGNUM], TARGET_PTR_BIT / 8); } } @@ -1364,7 +1364,7 @@ hppa_frame_chain (struct frame_info *frame) u = find_unwind_entry (DEPRECATED_FRAME_SAVED_PC (frame)); if (!u) { - return read_memory_integer (saved_regs[FP_REGNUM], + return read_memory_integer (saved_regs[DEPRECATED_FP_REGNUM], TARGET_PTR_BIT / 8); } else @@ -1375,7 +1375,7 @@ hppa_frame_chain (struct frame_info *frame) /* The value in %r3 was never saved into the stack (thus %r3 still holds the value of the previous frame pointer). */ - return TARGET_READ_FP (); + return deprecated_read_fp (); } } @@ -1472,15 +1472,15 @@ hppa_push_dummy_frame (void) else write_memory (sp - 20, (char *) &int_buffer, REGISTER_SIZE); - int_buffer = TARGET_READ_FP (); + int_buffer = deprecated_read_fp (); write_memory (sp, (char *) &int_buffer, REGISTER_SIZE); - write_register (FP_REGNUM, sp); + write_register (DEPRECATED_FP_REGNUM, sp); sp += 2 * REGISTER_SIZE; for (regnum = 1; regnum < 32; regnum++) - if (regnum != RP_REGNUM && regnum != FP_REGNUM) + if (regnum != RP_REGNUM && regnum != DEPRECATED_FP_REGNUM) sp = push_word (sp, read_register (regnum)); /* This is not necessary for the 64bit ABI. In fact it is dangerous. */ @@ -1515,13 +1515,13 @@ find_dummy_frame_regs (struct frame_info *frame, else frame_saved_regs[RP_REGNUM] = (fp - 20) & ~0x3; - frame_saved_regs[FP_REGNUM] = fp; + frame_saved_regs[DEPRECATED_FP_REGNUM] = fp; frame_saved_regs[1] = fp + (2 * REGISTER_SIZE); for (fp += 3 * REGISTER_SIZE, i = 3; i < 32; i++) { - if (i != FP_REGNUM) + if (i != DEPRECATED_FP_REGNUM) { frame_saved_regs[i] = fp; fp += REGISTER_SIZE; @@ -1598,7 +1598,7 @@ hppa_pop_frame (void) write_pc (npc); } - write_register (FP_REGNUM, read_memory_integer (fp, REGISTER_SIZE)); + write_register (DEPRECATED_FP_REGNUM, read_memory_integer (fp, REGISTER_SIZE)); if (fsr[IPSW_REGNUM]) /* call dummy */ write_register (SP_REGNUM, fp - 48); @@ -2442,8 +2442,8 @@ hppa_read_fp (int pid) } /* This is the only site that may directly read_register () the FP - register. All others must use TARGET_READ_FP (). */ - return read_register (FP_REGNUM); + register. All others must use deprecated_read_fp (). */ + return read_register (DEPRECATED_FP_REGNUM); } CORE_ADDR @@ -3590,7 +3590,7 @@ restart: for (i = 3; i < u->Entry_GR + 3; i++) { /* Frame pointer gets saved into a special location. */ - if (u->Save_SP && i == FP_REGNUM) + if (u->Save_SP && i == DEPRECATED_FP_REGNUM) continue; save_gr |= (1 << i); @@ -3941,7 +3941,7 @@ hppa_frame_find_saved_regs (struct frame_info *frame_info, for (i = 3; i < u->Entry_GR + 3; i++) { /* Frame pointer gets saved into a special location. */ - if (u->Save_SP && i == FP_REGNUM) + if (u->Save_SP && i == DEPRECATED_FP_REGNUM) continue; save_gr |= (1 << i); @@ -4003,14 +4003,14 @@ hppa_frame_find_saved_regs (struct frame_info *frame_info, if ( (inst & 0xffffc000) == 0x6fc10000 /* stw,ma r1,N(sr0,sp) */ || (inst & 0xffffc00c) == 0x73c10008) /* std,ma r1,N(sr0,sp) */ { - frame_saved_regs[FP_REGNUM] = get_frame_base (frame_info); + frame_saved_regs[DEPRECATED_FP_REGNUM] = get_frame_base (frame_info); save_sp = 0; } /* Account for general and floating-point register saves. */ reg = inst_saves_gr (inst); if (reg >= 3 && reg <= 18 - && (!u->Save_SP || reg != FP_REGNUM)) + && (!u->Save_SP || reg != DEPRECATED_FP_REGNUM)) { save_gr &= ~(1 << reg); @@ -4991,7 +4991,7 @@ hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_decr_pc_after_break (gdbarch, 0); set_gdbarch_register_size (gdbarch, 4); set_gdbarch_num_regs (gdbarch, hppa_num_regs); - set_gdbarch_fp_regnum (gdbarch, 3); + set_gdbarch_deprecated_fp_regnum (gdbarch, 3); set_gdbarch_sp_regnum (gdbarch, 30); set_gdbarch_fp0_regnum (gdbarch, 64); set_gdbarch_pc_regnum (gdbarch, PCOQ_HEAD_REGNUM); @@ -5030,7 +5030,7 @@ hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_believe_pcc_promotion (gdbarch, 1); set_gdbarch_read_pc (gdbarch, hppa_target_read_pc); set_gdbarch_write_pc (gdbarch, hppa_target_write_pc); - set_gdbarch_read_fp (gdbarch, hppa_target_read_fp); + set_gdbarch_deprecated_target_read_fp (gdbarch, hppa_target_read_fp); return gdbarch; } diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 88f39207632..07c82b608f0 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -669,7 +669,7 @@ i386_frame_init_saved_regs (struct frame_info *fip) } get_frame_saved_regs (fip)[PC_REGNUM] = get_frame_base (fip) + 4; - get_frame_saved_regs (fip)[FP_REGNUM] = get_frame_base (fip); + get_frame_saved_regs (fip)[DEPRECATED_FP_REGNUM] = get_frame_base (fip); } /* Return PC of first real instruction. */ @@ -808,7 +808,7 @@ i386_do_pop_frame (struct frame_info *frame) deprecated_write_register_gen (regnum, regbuf); } } - write_register (FP_REGNUM, read_memory_integer (fp, 4)); + write_register (DEPRECATED_FP_REGNUM, read_memory_integer (fp, 4)); write_register (PC_REGNUM, read_memory_integer (fp + 4, 4)); write_register (SP_REGNUM, fp + 8); flush_cached_frames (); @@ -1057,7 +1057,7 @@ i386_use_struct_convention (int gcc_p, struct type *type) static struct type * i386_register_type (struct gdbarch *gdbarch, int regnum) { - if (regnum == PC_REGNUM || regnum == FP_REGNUM || regnum == SP_REGNUM) + if (regnum == PC_REGNUM || regnum == DEPRECATED_FP_REGNUM || regnum == SP_REGNUM) return lookup_pointer_type (builtin_type_void); if (i386_fp_regnum_p (regnum)) @@ -1469,7 +1469,7 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_num_regs (gdbarch, I386_NUM_GREGS + I386_NUM_FREGS); set_gdbarch_sp_regnum (gdbarch, 4); /* %esp */ - set_gdbarch_fp_regnum (gdbarch, 5); /* %ebp */ + set_gdbarch_deprecated_fp_regnum (gdbarch, 5); /* %ebp */ set_gdbarch_pc_regnum (gdbarch, 8); /* %eip */ set_gdbarch_ps_regnum (gdbarch, 9); /* %eflags */ set_gdbarch_fp0_regnum (gdbarch, 16); /* %st(0) */ diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c index b0c29d8a9f0..2c5a0c07a26 100644 --- a/gdb/ia64-tdep.c +++ b/gdb/ia64-tdep.c @@ -678,8 +678,8 @@ rse_address_add(CORE_ADDR addr, int nslots) computationally expensive. So, instead of making life difficult (and slow), we pick a more convenient representation of the frame chain, knowing that we'll have to make some small adjustments in - other places. (E.g, note that read_fp() is actually read_sp() in - ia64_gdbarch_init() below.) + other places. (E.g, note that deprecated_read_fp() is actually + read_sp() in ia64_gdbarch_init() below.) Okay, so what is the frame chain exactly? It'll be the SP value at the time that the function in question was entered. @@ -2168,7 +2168,7 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_num_regs (gdbarch, ia64_num_regs); set_gdbarch_sp_regnum (gdbarch, sp_regnum); - set_gdbarch_fp_regnum (gdbarch, fp_regnum); + set_gdbarch_deprecated_fp_regnum (gdbarch, fp_regnum); set_gdbarch_pc_regnum (gdbarch, pc_regnum); set_gdbarch_fp0_regnum (gdbarch, IA64_FR0_REGNUM); @@ -2223,12 +2223,12 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_frame_args_address (gdbarch, ia64_frame_args_address); set_gdbarch_frame_locals_address (gdbarch, ia64_frame_locals_address); - /* We won't necessarily have a frame pointer and even if we do, - it winds up being extraordinarly messy when attempting to find - the frame chain. So for the purposes of creating frames (which - is all read_fp() is used for), simply use the stack pointer value - instead. */ - set_gdbarch_read_fp (gdbarch, generic_target_read_sp); + /* We won't necessarily have a frame pointer and even if we do, it + winds up being extraordinarly messy when attempting to find the + frame chain. So for the purposes of creating frames (which is + all deprecated_read_fp() is used for), simply use the stack + pointer value instead. */ + set_gdbarch_deprecated_target_read_fp (gdbarch, generic_target_read_sp); /* Settings that should be unnecessary. */ set_gdbarch_inner_than (gdbarch, core_addr_lessthan); diff --git a/gdb/infcall.c b/gdb/infcall.c index 9d9cddda320..f87d3ba3258 100644 --- a/gdb/infcall.c +++ b/gdb/infcall.c @@ -737,9 +737,19 @@ You must use a pointer to function type variable. Command ignored.", arg_name); sal.section = find_pc_overlay (sal.pc); /* Set up a frame ID for the dummy frame so we can pass it to set_momentary_breakpoint. We need to give the breakpoint a - frame ID so that the breakpoint code can correctly - re-identify the dummy breakpoint. */ - frame = frame_id_build (read_fp (), sal.pc); + frame ID so that the breakpoint code can correctly re-identify + the dummy breakpoint. */ + /* The assumption here is that push_dummy_call() returned the + stack part of the frame ID. Unfortunatly, many older + architectures were, via a convoluted mess, relying on the + poorly defined and greatly overloaded DEPRECATED_TARGET_READ_FP + or DEPRECATED_FP_REGNUM to supply the value. */ + if (DEPRECATED_TARGET_READ_FP_P ()) + frame = frame_id_build (DEPRECATED_TARGET_READ_FP (), sal.pc); + else if (DEPRECATED_FP_REGNUM >= 0) + frame = frame_id_build (read_register (DEPRECATED_FP_REGNUM), sal.pc); + else + frame = frame_id_build (sp, sal.pc); bpt = set_momentary_breakpoint (sal, frame, bp_call_dummy); bpt->disposition = disp_del; } diff --git a/gdb/inferior.h b/gdb/inferior.h index 0950973907c..e4286e4a8f3 100644 --- a/gdb/inferior.h +++ b/gdb/inferior.h @@ -182,9 +182,7 @@ extern CORE_ADDR generic_target_read_sp (void); extern void generic_target_write_sp (CORE_ADDR); -extern CORE_ADDR read_fp (void); - -extern CORE_ADDR generic_target_read_fp (void); +extern CORE_ADDR deprecated_read_fp (void); extern CORE_ADDR unsigned_pointer_to_address (struct type *type, const void *buf); diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c index 37d27a544be..8b69c1113ff 100644 --- a/gdb/m68hc11-tdep.c +++ b/gdb/m68hc11-tdep.c @@ -1367,12 +1367,11 @@ m68hc11_gdbarch_init (struct gdbarch_info info, set_gdbarch_read_pc (gdbarch, generic_target_read_pc); 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_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); + set_gdbarch_deprecated_fp_regnum (gdbarch, SOFT_FP_REGNUM); set_gdbarch_register_name (gdbarch, m68hc11_register_name); set_gdbarch_register_size (gdbarch, 2); set_gdbarch_register_bytes (gdbarch, M68HC11_ALL_REGS * 2); diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c index bdc2da6bf7c..63d076883b1 100644 --- a/gdb/m68k-tdep.c +++ b/gdb/m68k-tdep.c @@ -445,8 +445,8 @@ m68k_push_dummy_frame (void) char raw_buffer[12]; sp = push_word (sp, read_register (PC_REGNUM)); - sp = push_word (sp, read_register (FP_REGNUM)); - write_register (FP_REGNUM, sp); + sp = push_word (sp, read_register (DEPRECATED_FP_REGNUM)); + write_register (DEPRECATED_FP_REGNUM, sp); /* Always save the floating-point registers, whether they exist on this target or not. */ @@ -456,7 +456,7 @@ m68k_push_dummy_frame (void) sp = push_bytes (sp, raw_buffer, 12); } - for (regnum = FP_REGNUM - 1; regnum >= 0; regnum--) + for (regnum = DEPRECATED_FP_REGNUM - 1; regnum >= 0; regnum--) { sp = push_word (sp, read_register (regnum)); } @@ -486,7 +486,7 @@ m68k_pop_frame (void) 12); } } - for (regnum = FP_REGNUM - 1; regnum >= 0; regnum--) + for (regnum = DEPRECATED_FP_REGNUM - 1; regnum >= 0; regnum--) { if (get_frame_saved_regs (frame)[regnum]) { @@ -499,7 +499,7 @@ m68k_pop_frame (void) write_register (PS_REGNUM, read_memory_integer (get_frame_saved_regs (frame)[PS_REGNUM], 4)); } - write_register (FP_REGNUM, read_memory_integer (fp, 4)); + write_register (DEPRECATED_FP_REGNUM, read_memory_integer (fp, 4)); write_register (PC_REGNUM, read_memory_integer (fp + 4, 4)); write_register (SP_REGNUM, fp + 8); flush_cached_frames (); @@ -589,7 +589,7 @@ m68k_frame_init_saved_regs (struct frame_info *frame_info) /* First possible address for a pc in a call dummy for this frame. */ CORE_ADDR possible_call_dummy_start = - get_frame_base (frame_info) - 28 - FP_REGNUM * 4 - 4 - 8 * 12; + get_frame_base (frame_info) - 28 - DEPRECATED_FP_REGNUM * 4 - 4 - 8 * 12; int nextinsn; @@ -743,7 +743,7 @@ m68k_frame_init_saved_regs (struct frame_info *frame_info) } lose:; get_frame_saved_regs (frame_info)[SP_REGNUM] = get_frame_base (frame_info) + 8; - get_frame_saved_regs (frame_info)[FP_REGNUM] = get_frame_base (frame_info); + get_frame_saved_regs (frame_info)[DEPRECATED_FP_REGNUM] = get_frame_base (frame_info); get_frame_saved_regs (frame_info)[PC_REGNUM] = get_frame_base (frame_info) + 4; #ifdef SIG_SP_FP_OFFSET /* Adjust saved SP_REGNUM for fake _sigtramp frames. */ @@ -1031,7 +1031,7 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_register_bytes_ok (gdbarch, m68k_register_bytes_ok); set_gdbarch_register_bytes (gdbarch, (16 * 4 + 8 + 8 * 12 + 3 * 4)); set_gdbarch_sp_regnum (gdbarch, M68K_SP_REGNUM); - set_gdbarch_fp_regnum (gdbarch, M68K_FP_REGNUM); + set_gdbarch_deprecated_fp_regnum (gdbarch, M68K_FP_REGNUM); set_gdbarch_pc_regnum (gdbarch, M68K_PC_REGNUM); set_gdbarch_ps_regnum (gdbarch, M68K_PS_REGNUM); set_gdbarch_fp0_regnum (gdbarch, M68K_FP0_REGNUM); diff --git a/gdb/mcore-tdep.c b/gdb/mcore-tdep.c index 970e56c7d30..d0f4189b78a 100644 --- a/gdb/mcore-tdep.c +++ b/gdb/mcore-tdep.c @@ -1112,7 +1112,7 @@ mcore_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_num_regs (gdbarch, MCORE_NUM_REGS); set_gdbarch_pc_regnum (gdbarch, 64); set_gdbarch_sp_regnum (gdbarch, 0); - set_gdbarch_fp_regnum (gdbarch, 0); + set_gdbarch_deprecated_fp_regnum (gdbarch, 0); /* Call Dummies: */ diff --git a/gdb/mips-nat.c b/gdb/mips-nat.c index f893e339c2e..3aaaa91c339 100644 --- a/gdb/mips-nat.c +++ b/gdb/mips-nat.c @@ -91,7 +91,7 @@ fetch_inferior_registers (int regno) supply_register (ZERO_REGNUM, zerobuf); /* Frame ptr reg must appear to be 0; it is faked by stack handling code. */ - supply_register (FP_REGNUM, zerobuf); + supply_register (DEPRECATED_FP_REGNUM, zerobuf); } /* Store our register values back into the inferior. @@ -108,7 +108,7 @@ store_inferior_registers (int regno) { if (regno == ZERO_REGNUM || regno == PS_REGNUM || regno == BADVADDR_REGNUM || regno == CAUSE_REGNUM - || regno == FCRIR_REGNUM || regno == FP_REGNUM + || regno == FCRIR_REGNUM || regno == DEPRECATED_FP_REGNUM || (regno >= FIRST_EMBED_REGNUM && regno <= LAST_EMBED_REGNUM)) return; regaddr = REGISTER_PTRACE_ADDR (regno); @@ -210,7 +210,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which, } supply_register (ZERO_REGNUM, zerobuf); /* Frame ptr reg must appear to be 0; it is faked by stack handling code. */ - supply_register (FP_REGNUM, zerobuf); + supply_register (DEPRECATED_FP_REGNUM, zerobuf); } /* Return the address in the core dump or inferior of register REGNO. diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index b70e6aa9778..74b72193a16 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -623,9 +623,9 @@ if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG Note: kevinb/2002-08-01: The definition below should faithfully reproduce the behavior of each of the REGISTER_VIRTUAL_TYPE - definitions found in config/mips/tm-*.h. I'm concerned about - the ``FCRCS_REGNUM <= reg && reg <= LAST_EMBED_REGNUM'' clause - though. In some cases FP_REGNUM is in this range, and I doubt + definitions found in config/mips/tm-*.h. I'm concerned about the + ``FCRCS_REGNUM <= reg && reg <= LAST_EMBED_REGNUM'' clause though. + In some cases DEPRECATED_FP_REGNUM is in this range, and I doubt that this code is correct for the 64-bit case. */ static struct type * @@ -5880,7 +5880,7 @@ mips_gdbarch_init (struct gdbarch_info info, set_gdbarch_register_name (gdbarch, mips_register_name); set_gdbarch_read_pc (gdbarch, mips_read_pc); set_gdbarch_write_pc (gdbarch, generic_target_write_pc); - set_gdbarch_read_fp (gdbarch, mips_read_sp); /* Draft FRAME base. */ + set_gdbarch_deprecated_target_read_fp (gdbarch, mips_read_sp); /* Draft FRAME base. */ set_gdbarch_read_sp (gdbarch, mips_read_sp); set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp); diff --git a/gdb/mipsv4-nat.c b/gdb/mipsv4-nat.c index 2695f1f8dbf..874bef4f399 100644 --- a/gdb/mipsv4-nat.c +++ b/gdb/mipsv4-nat.c @@ -61,7 +61,7 @@ supply_gregset (gregset_t *gregsetp) /* Fill inaccessible registers with zero. */ supply_register (PS_REGNUM, zerobuf); supply_register (BADVADDR_REGNUM, zerobuf); - supply_register (FP_REGNUM, zerobuf); + supply_register (DEPRECATED_FP_REGNUM, zerobuf); supply_register (UNUSED_REGNUM, zerobuf); for (regi = FIRST_EMBED_REGNUM; regi <= LAST_EMBED_REGNUM; regi++) supply_register (regi, zerobuf); diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c index 60ef14e8e12..8d7de772992 100644 --- a/gdb/mn10300-tdep.c +++ b/gdb/mn10300-tdep.c @@ -1157,7 +1157,7 @@ mn10300_gdbarch_init (struct gdbarch_info info, set_gdbarch_deprecated_do_registers_info (gdbarch, mn10300_do_registers_info); set_gdbarch_sp_regnum (gdbarch, 8); set_gdbarch_pc_regnum (gdbarch, 9); - set_gdbarch_fp_regnum (gdbarch, 31); + set_gdbarch_deprecated_fp_regnum (gdbarch, 31); set_gdbarch_virtual_frame_pointer (gdbarch, mn10300_virtual_frame_pointer); /* Breakpoints. */ @@ -1183,7 +1183,7 @@ mn10300_gdbarch_init (struct gdbarch_info info, set_gdbarch_frame_args_skip (gdbarch, 0); set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown); /* That's right, we're using the stack pointer as our frame pointer. */ - set_gdbarch_read_fp (gdbarch, generic_target_read_sp); + set_gdbarch_deprecated_target_read_fp (gdbarch, generic_target_read_sp); /* Calling functions in the inferior from GDB. */ set_gdbarch_call_dummy_words (gdbarch, mn10300_call_dummy_words); diff --git a/gdb/nlm/i386.c b/gdb/nlm/i386.c index b8ab480b996..8fc6b1dd01b 100644 --- a/gdb/nlm/i386.c +++ b/gdb/nlm/i386.c @@ -92,7 +92,7 @@ do_status (char *ptr, struct StackFrame *frame) ptr = mem2hex (&frame->ExceptionESP, ptr + 3, 4, 0); *ptr++ = ';'; - sprintf (ptr, "%02x:", FP_REGNUM); + sprintf (ptr, "%02x:", DEPRECATED_FP_REGNUM); ptr = mem2hex (&frame->ExceptionEBP, ptr + 3, 4, 0); *ptr++ = ';'; diff --git a/gdb/nlm/i386.h b/gdb/nlm/i386.h index 155702bd503..ff97aed2e49 100644 --- a/gdb/nlm/i386.h +++ b/gdb/nlm/i386.h @@ -1,7 +1,7 @@ /* Register values. All of these values *MUST* agree with tm.h */ #define SP_REGNUM 4 /* Contains address of top of stack */ #define PC_REGNUM 8 /* Contains program counter */ -#define FP_REGNUM 5 /* Virtual frame pointer */ +#define DEPRECATED_FP_REGNUM 5 /* Virtual frame pointer */ #define NUM_REGS 16 /* Number of machine registers */ #define REGISTER_BYTES (NUM_REGS * 4) /* Total size of registers array */ diff --git a/gdb/ns32k-tdep.c b/gdb/ns32k-tdep.c index 44da1bf469f..27d75999bca 100644 --- a/gdb/ns32k-tdep.c +++ b/gdb/ns32k-tdep.c @@ -395,7 +395,7 @@ ns32k_frame_init_saved_regs (struct frame_info *frame) get_frame_saved_regs (frame)[SP_REGNUM] = get_frame_base (frame) + 4; get_frame_saved_regs (frame)[PC_REGNUM] = get_frame_base (frame) + 4; - get_frame_saved_regs (frame)[FP_REGNUM] = read_memory_integer (get_frame_base (frame), 4); + get_frame_saved_regs (frame)[DEPRECATED_FP_REGNUM] = read_memory_integer (get_frame_base (frame), 4); } else if (enter_addr == 1) { @@ -412,8 +412,8 @@ ns32k_push_dummy_frame (void) int regnum; sp = push_word (sp, read_register (PC_REGNUM)); - sp = push_word (sp, read_register (FP_REGNUM)); - write_register (FP_REGNUM, sp); + sp = push_word (sp, read_register (DEPRECATED_FP_REGNUM)); + write_register (DEPRECATED_FP_REGNUM, sp); for (regnum = 0; regnum < 8; regnum++) sp = push_word (sp, read_register (regnum)); @@ -436,7 +436,7 @@ ns32k_pop_frame (void) write_register (regnum, read_memory_integer (get_frame_saved_regs (frame)[regnum], 4)); - write_register (FP_REGNUM, read_memory_integer (fp, 4)); + write_register (DEPRECATED_FP_REGNUM, read_memory_integer (fp, 4)); write_register (PC_REGNUM, read_memory_integer (fp + 4, 4)); write_register (SP_REGNUM, fp + 8); flush_cached_frames (); diff --git a/gdb/ns32knbsd-nat.c b/gdb/ns32knbsd-nat.c index 24e422db661..2fe6d10bb47 100644 --- a/gdb/ns32knbsd-nat.c +++ b/gdb/ns32knbsd-nat.c @@ -58,7 +58,7 @@ fetch_inferior_registers (int regno) RF (R0_REGNUM + 7, inferior_registers.r_r7); RF (SP_REGNUM, inferior_registers.r_sp); - RF (FP_REGNUM, inferior_registers.r_fp); + RF (DEPRECATED_FP_REGNUM, inferior_registers.r_fp); RF (PC_REGNUM, inferior_registers.r_pc); RF (PS_REGNUM, inferior_registers.r_psr); @@ -90,7 +90,7 @@ store_inferior_registers (int regno) RS (R0_REGNUM + 7, inferior_registers.r_r7); RS (SP_REGNUM, inferior_registers.r_sp); - RS (FP_REGNUM, inferior_registers.r_fp); + RS (DEPRECATED_FP_REGNUM, inferior_registers.r_fp); RS (PC_REGNUM, inferior_registers.r_pc); RS (PS_REGNUM, inferior_registers.r_psr); @@ -150,7 +150,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which, RF (R0_REGNUM + 7, core_reg->intreg.r_r7); RF (SP_REGNUM, core_reg->intreg.r_sp); - RF (FP_REGNUM, core_reg->intreg.r_fp); + RF (DEPRECATED_FP_REGNUM, core_reg->intreg.r_fp); RF (PC_REGNUM, core_reg->intreg.r_pc); RF (PS_REGNUM, core_reg->intreg.r_psr); @@ -223,7 +223,7 @@ fetch_kcore_registers (struct pcb *pcb) dummy = pcb->pcb_kfp + 8; RF (SP_REGNUM, dummy); - RF (FP_REGNUM, sf.sf_fp); + RF (DEPRECATED_FP_REGNUM, sf.sf_fp); RF (PC_REGNUM, sf.sf_pc); RF (PS_REGNUM, intreg.r_psr); @@ -258,7 +258,7 @@ clear_regs (void) RF (R0_REGNUM + 7, null); RF (SP_REGNUM, null); - RF (FP_REGNUM, null); + RF (DEPRECATED_FP_REGNUM, null); RF (PC_REGNUM, null); RF (PS_REGNUM, null); diff --git a/gdb/procfs.c b/gdb/procfs.c index 2f14c5d2402..96cdaa9a37d 100644 --- a/gdb/procfs.c +++ b/gdb/procfs.c @@ -3706,7 +3706,7 @@ procfs_fetch_registers (int regno) if ((regno >= 0 && regno < FP0_REGNUM) || regno == PC_REGNUM || (NPC_REGNUM >= 0 && regno == NPC_REGNUM) || - regno == FP_REGNUM || + regno == DEPRECATED_FP_REGNUM || regno == SP_REGNUM) return; /* not a floating point register */ @@ -3780,7 +3780,7 @@ procfs_store_registers (int regno) if ((regno >= 0 && regno < FP0_REGNUM) || regno == PC_REGNUM || (NPC_REGNUM >= 0 && regno == NPC_REGNUM) || - regno == FP_REGNUM || + regno == DEPRECATED_FP_REGNUM || regno == SP_REGNUM) return; /* not a floating point register */ diff --git a/gdb/regcache.c b/gdb/regcache.c index 70af06f2fab..e0a0b89336b 100644 --- a/gdb/regcache.c +++ b/gdb/regcache.c @@ -1328,16 +1328,16 @@ regcache_collect (int regnum, void *buf) } -/* read_pc, write_pc, read_sp, read_fp, etc. Special handling for - registers PC, SP, and FP. */ +/* read_pc, write_pc, read_sp, deprecated_read_fp, etc. Special + handling for registers PC, SP, and FP. */ /* NOTE: cagney/2001-02-18: The functions generic_target_read_pc(), read_pc_pid(), read_pc(), generic_target_write_pc(), write_pc_pid(), write_pc(), generic_target_read_sp(), read_sp(), - generic_target_write_sp(), generic_target_read_fp() and read_fp(), - will eventually be moved out of the reg-cache into either - frame.[hc] or to the multi-arch framework. The are not part of the - raw register cache. */ + generic_target_write_sp(), and deprecated_read_fp(), will + eventually be moved out of the reg-cache into either frame.[hc] or + to the multi-arch framework. The are not part of the raw register + cache. */ /* This routine is getting awfully cluttered with #if's. It's probably time to turn this into READ_PC and define it in the tm.h file. @@ -1457,20 +1457,14 @@ generic_target_write_sp (CORE_ADDR val) } CORE_ADDR -generic_target_read_fp (void) +deprecated_read_fp (void) { -#ifdef FP_REGNUM - if (FP_REGNUM >= 0) - return read_register (FP_REGNUM); -#endif - internal_error (__FILE__, __LINE__, - "generic_target_read_fp"); -} - -CORE_ADDR -read_fp (void) -{ - return TARGET_READ_FP (); + if (DEPRECATED_TARGET_READ_FP_P ()) + return DEPRECATED_TARGET_READ_FP (); + else if (DEPRECATED_FP_REGNUM >= 0) + return read_register (DEPRECATED_FP_REGNUM); + else + internal_error (__FILE__, __LINE__, "deprecated_read_fp"); } /* ARGSUSED */ diff --git a/gdb/remote-e7000.c b/gdb/remote-e7000.c index 49c7fb99ae8..3b9a9414dde 100644 --- a/gdb/remote-e7000.c +++ b/gdb/remote-e7000.c @@ -856,9 +856,9 @@ fetch_regs_from_dump (int (*nextchar) (), char *want) want++; break; #endif -#ifdef FP_REGNUM +#ifdef DEPRECATED_FP_REGNUM case 'f': - regno = FP_REGNUM; + regno = DEPRECATED_FP_REGNUM; want++; break; #endif diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c index a23f72d4606..17994f9d4da 100644 --- a/gdb/remote-mips.c +++ b/gdb/remote-mips.c @@ -1802,8 +1802,8 @@ mips_wait (ptid_t ptid, struct target_waitstatus *status) store_unsigned_integer (buf, REGISTER_RAW_SIZE (SP_REGNUM), rsp); supply_register (SP_REGNUM, buf); - store_unsigned_integer (buf, REGISTER_RAW_SIZE (FP_REGNUM), 0); - supply_register (FP_REGNUM, buf); + store_unsigned_integer (buf, REGISTER_RAW_SIZE (DEPRECATED_FP_REGNUM), 0); + supply_register (DEPRECATED_FP_REGNUM, buf); if (nfields == 9) { @@ -1943,9 +1943,9 @@ mips_fetch_registers (int regno) return; } - if (regno == FP_REGNUM || regno == ZERO_REGNUM) - /* FP_REGNUM on the mips is a hack which is just supposed to read - zero (see also mips-nat.c). */ + if (regno == DEPRECATED_FP_REGNUM || regno == ZERO_REGNUM) + /* DEPRECATED_FP_REGNUM on the mips is a hack which is just + supposed to read zero (see also mips-nat.c). */ val = 0; else { diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index 9f553687ec4..019284901ac 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -2797,7 +2797,7 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_pc_regnum (gdbarch, 64); set_gdbarch_sp_regnum (gdbarch, 1); - set_gdbarch_fp_regnum (gdbarch, 1); + set_gdbarch_deprecated_fp_regnum (gdbarch, 1); set_gdbarch_deprecated_extract_return_value (gdbarch, rs6000_extract_return_value); set_gdbarch_deprecated_store_return_value (gdbarch, rs6000_store_return_value); @@ -2830,7 +2830,7 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) tdep->ppc_ev31_regnum = 38; set_gdbarch_pc_regnum (gdbarch, 0); set_gdbarch_sp_regnum (gdbarch, tdep->ppc_gp0_regnum + 1); - set_gdbarch_fp_regnum (gdbarch, tdep->ppc_gp0_regnum + 1); + set_gdbarch_deprecated_fp_regnum (gdbarch, tdep->ppc_gp0_regnum + 1); set_gdbarch_dwarf2_reg_to_regnum (gdbarch, e500_dwarf2_reg_to_regnum); set_gdbarch_pseudo_register_read (gdbarch, e500_pseudo_register_read); set_gdbarch_pseudo_register_write (gdbarch, e500_pseudo_register_write); @@ -2872,7 +2872,6 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_read_pc (gdbarch, generic_target_read_pc); 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_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp); diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c index 6a490c786cf..b16674f09a9 100644 --- a/gdb/s390-tdep.c +++ b/gdb/s390-tdep.c @@ -1658,7 +1658,7 @@ s390_push_arguments (int nargs, struct value **args, CORE_ADDR sp, frame. This will help us get backtraces from within functions called from GDB. */ write_memory_unsigned_integer (sp, (TARGET_PTR_BIT / TARGET_CHAR_BIT), - read_fp ()); + deprecated_read_fp ()); return sp; } @@ -1841,7 +1841,7 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_skip_prologue (gdbarch, s390_skip_prologue); set_gdbarch_deprecated_init_extra_frame_info (gdbarch, s390_init_extra_frame_info); set_gdbarch_deprecated_init_frame_pc_first (gdbarch, s390_init_frame_pc_first); - set_gdbarch_read_fp (gdbarch, s390_read_fp); + set_gdbarch_deprecated_target_read_fp (gdbarch, s390_read_fp); /* This function that tells us whether the function invocation represented by FI does not have a frame on the stack associated with it. If it does not, FRAMELESS is set to 1, else 0. */ @@ -1856,7 +1856,7 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_register_byte (gdbarch, s390_register_byte); set_gdbarch_pc_regnum (gdbarch, S390_PC_REGNUM); set_gdbarch_sp_regnum (gdbarch, S390_SP_REGNUM); - set_gdbarch_fp_regnum (gdbarch, S390_FP_REGNUM); + set_gdbarch_deprecated_fp_regnum (gdbarch, S390_FP_REGNUM); set_gdbarch_fp0_regnum (gdbarch, S390_FP0_REGNUM); set_gdbarch_num_regs (gdbarch, S390_NUM_REGS); set_gdbarch_cannot_fetch_register (gdbarch, s390_cannot_fetch_register); diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c index 4bd3af18687..6bb0237cccd 100644 --- a/gdb/sh-tdep.c +++ b/gdb/sh-tdep.c @@ -1003,7 +1003,7 @@ sh64_frame_chain (struct frame_info *frame) if (gdbarch_tdep (current_gdbarch)->sh_abi == SH_ABI_32) size = 4; else - size = REGISTER_RAW_SIZE (translate_insn_rn (FP_REGNUM, media_mode)); + size = REGISTER_RAW_SIZE (translate_insn_rn (DEPRECATED_FP_REGNUM, media_mode)); return read_memory_integer (get_frame_base (frame) + get_frame_extra_info (frame)->f_offset, size); @@ -1172,7 +1172,7 @@ sh_nofp_frame_init_saved_regs (struct frame_info *fi) { if (where[rn] >= 0) { - if (rn == FP_REGNUM) + if (rn == DEPRECATED_FP_REGNUM) have_fp = 1; get_frame_saved_regs (fi)[rn] = get_frame_base (fi) - where[rn] + depth - 4; @@ -1185,14 +1185,14 @@ sh_nofp_frame_init_saved_regs (struct frame_info *fi) if (have_fp) { - get_frame_saved_regs (fi)[SP_REGNUM] = read_memory_integer (get_frame_saved_regs (fi)[FP_REGNUM], 4); + get_frame_saved_regs (fi)[SP_REGNUM] = read_memory_integer (get_frame_saved_regs (fi)[DEPRECATED_FP_REGNUM], 4); } else { get_frame_saved_regs (fi)[SP_REGNUM] = get_frame_base (fi) - 4; } - get_frame_extra_info (fi)->f_offset = depth - where[FP_REGNUM] - 4; + get_frame_extra_info (fi)->f_offset = depth - where[DEPRECATED_FP_REGNUM] - 4; /* Work out the return pc - either from the saved pr or the pr value */ } @@ -1477,7 +1477,7 @@ sh64_nofp_frame_init_saved_regs (struct frame_info *fi) /* The frame pointer register is general register 14 in shmedia and shcompact modes. In sh compact it is a pseudo register. Same goes for the stack pointer register, which is register 15. */ - fp_regnum = translate_insn_rn (FP_REGNUM, media_mode); + fp_regnum = translate_insn_rn (DEPRECATED_FP_REGNUM, media_mode); sp_regnum = translate_insn_rn (SP_REGNUM, media_mode); for (opc = pc + (insn_size * 28); pc < opc; pc += insn_size) @@ -1602,8 +1602,8 @@ sh64_nofp_frame_init_saved_regs (struct frame_info *fi) register r15 which still is the SP register. */ /* The place on the stack where fp is stored contains the sp of the caller. */ - /* Again, saved_registers contains only space for the real registers, - so we store in FP_REGNUM position. */ + /* Again, saved_registers contains only space for the real + registers, so we store in DEPRECATED_FP_REGNUM position. */ int size; if (tdep->sh_abi == SH_ABI_32) size = 4; @@ -1724,7 +1724,7 @@ sh_fp_frame_init_saved_regs (struct frame_info *fi) { if (where[rn] >= 0) { - if (rn == FP_REGNUM) + if (rn == DEPRECATED_FP_REGNUM) have_fp = 1; get_frame_saved_regs (fi)[rn] = get_frame_base (fi) - where[rn] + depth - 4; @@ -1738,14 +1738,14 @@ sh_fp_frame_init_saved_regs (struct frame_info *fi) if (have_fp) { get_frame_saved_regs (fi)[SP_REGNUM] = - read_memory_integer (get_frame_saved_regs (fi)[FP_REGNUM], 4); + read_memory_integer (get_frame_saved_regs (fi)[DEPRECATED_FP_REGNUM], 4); } else { get_frame_saved_regs (fi)[SP_REGNUM] = get_frame_base (fi) - 4; } - get_frame_extra_info (fi)->f_offset = depth - where[FP_REGNUM] - 4; + get_frame_extra_info (fi)->f_offset = depth - where[DEPRECATED_FP_REGNUM] - 4; /* Work out the return pc - either from the saved pr or the pr value */ } @@ -1885,7 +1885,7 @@ sh64_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp, { int size; if (tdep->sh_abi == SH_ABI_32 - && (live_regnum == FP_REGNUM + && (live_regnum == DEPRECATED_FP_REGNUM || live_regnum == tdep->PR_REGNUM)) size = 4; else @@ -1993,7 +1993,7 @@ sh64_pop_frame (void) { int size; if (tdep->sh_abi == SH_ABI_32 - && (regnum == FP_REGNUM + && (regnum == DEPRECATED_FP_REGNUM || regnum == tdep->PR_REGNUM)) size = 4; else @@ -4365,7 +4365,7 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_ptr_bit (gdbarch, 4 * TARGET_CHAR_BIT); set_gdbarch_num_regs (gdbarch, SH_DEFAULT_NUM_REGS); set_gdbarch_sp_regnum (gdbarch, 15); - set_gdbarch_fp_regnum (gdbarch, 14); + set_gdbarch_deprecated_fp_regnum (gdbarch, 14); set_gdbarch_pc_regnum (gdbarch, 16); set_gdbarch_register_size (gdbarch, 4); set_gdbarch_register_bytes (gdbarch, SH_DEFAULT_NUM_REGS * 4); @@ -4639,7 +4639,6 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_read_pc (gdbarch, generic_target_read_pc); 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_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp); diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c index 95342a8b522..fe829a3200b 100644 --- a/gdb/sparc-tdep.c +++ b/gdb/sparc-tdep.c @@ -310,8 +310,8 @@ sparc_init_extra_frame_info (int fromleaf, struct frame_info *fi) : get_frame_base (get_next_frame (fi))) : read_sp ()); - /* If fi->next is NULL, then we already set ->frame by passing read_fp() - to create_new_frame. */ + /* If fi->next is NULL, then we already set ->frame by passing + deprecated_read_fp() to create_new_frame. */ if (get_next_frame (fi)) { char *buf; @@ -335,7 +335,7 @@ sparc_init_extra_frame_info (int fromleaf, struct frame_info *fi) { /* Should we adjust for stack bias here? */ ULONGEST tmp; - frame_read_unsigned_register (fi, FP_REGNUM, &tmp); + frame_read_unsigned_register (fi, DEPRECATED_FP_REGNUM, &tmp); deprecated_update_frame_base_hack (fi, tmp); if (GDB_TARGET_IS_SPARC64 && (get_frame_base (fi) & 1)) deprecated_update_frame_base_hack (fi, get_frame_base (fi) + 2047); @@ -1065,16 +1065,16 @@ sparc_push_dummy_frame (void) if (GDB_TARGET_IS_SPARC64) { /* Target is a 64 bit SPARC. */ - CORE_ADDR oldfp = read_register (FP_REGNUM); + CORE_ADDR oldfp = read_register (DEPRECATED_FP_REGNUM); if (oldfp & 1) - write_register (FP_REGNUM, old_sp - 2047); + write_register (DEPRECATED_FP_REGNUM, old_sp - 2047); else - write_register (FP_REGNUM, old_sp); + write_register (DEPRECATED_FP_REGNUM, old_sp); } else { /* Target is a 32 bit SPARC. */ - write_register (FP_REGNUM, old_sp); + write_register (DEPRECATED_FP_REGNUM, old_sp); } /* Set return address register for the call dummy to the current PC. */ write_register (I7_REGNUM, read_pc () - 8); @@ -1084,7 +1084,7 @@ sparc_push_dummy_frame (void) /* The call dummy will write this value to FP before executing the 'save'. This ensures that register window flushes work correctly in the simulator. */ - write_register (G0_REGNUM + 1, read_register (FP_REGNUM)); + write_register (G0_REGNUM + 1, read_register (DEPRECATED_FP_REGNUM)); /* The call dummy will write this value to FP after executing the 'save'. */ @@ -1096,7 +1096,7 @@ sparc_push_dummy_frame (void) /* Set the FP that the call dummy will be using after the 'save'. This makes backtraces from an inferior function call work properly. */ - write_register (FP_REGNUM, old_sp); + write_register (DEPRECATED_FP_REGNUM, old_sp); } } @@ -2481,7 +2481,7 @@ sparc64_read_sp (void) CORE_ADDR sparc64_read_fp (void) { - CORE_ADDR fp = read_register (FP_REGNUM); + CORE_ADDR fp = read_register (DEPRECATED_FP_REGNUM); if (fp & 1) fp += 2047; @@ -2935,7 +2935,7 @@ static struct type * sparc32_register_virtual_type (int regno) { if (regno == PC_REGNUM || - regno == FP_REGNUM || + regno == DEPRECATED_FP_REGNUM || regno == SP_REGNUM) return builtin_type_unsigned_int; if (regno < 32) @@ -2949,7 +2949,7 @@ static struct type * sparc64_register_virtual_type (int regno) { if (regno == PC_REGNUM || - regno == FP_REGNUM || + regno == DEPRECATED_FP_REGNUM || regno == SP_REGNUM) return builtin_type_unsigned_long_long; if (regno < 32) @@ -3162,7 +3162,7 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_deprecated_extract_struct_value_address (gdbarch, sparc_extract_struct_value_address); set_gdbarch_fix_call_dummy (gdbarch, sparc_gdbarch_fix_call_dummy); set_gdbarch_float_bit (gdbarch, 4 * TARGET_CHAR_BIT); - set_gdbarch_fp_regnum (gdbarch, SPARC_FP_REGNUM); + set_gdbarch_deprecated_fp_regnum (gdbarch, SPARC_FP_REGNUM); set_gdbarch_fp0_regnum (gdbarch, SPARC_FP0_REGNUM); set_gdbarch_deprecated_frame_chain (gdbarch, sparc_frame_chain); set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sparc_frame_init_saved_regs); @@ -3278,7 +3278,6 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_pc_regnum (gdbarch, SPARC32_PC_REGNUM); set_gdbarch_ptr_bit (gdbarch, 4 * TARGET_CHAR_BIT); set_gdbarch_deprecated_push_arguments (gdbarch, sparc32_push_arguments); - set_gdbarch_read_fp (gdbarch, generic_target_read_fp); set_gdbarch_read_sp (gdbarch, generic_target_read_sp); set_gdbarch_register_byte (gdbarch, sparc32_register_byte); @@ -3331,7 +3330,7 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_ptr_bit (gdbarch, 8 * TARGET_CHAR_BIT); set_gdbarch_deprecated_push_arguments (gdbarch, sparc64_push_arguments); /* NOTE different for at_entry */ - set_gdbarch_read_fp (gdbarch, sparc64_read_fp); + set_gdbarch_deprecated_target_read_fp (gdbarch, sparc64_read_fp); set_gdbarch_read_sp (gdbarch, sparc64_read_sp); /* Some of the registers aren't 64 bits, but it's a lot simpler just to assume they all are (since most of them are). */ diff --git a/gdb/std-regs.c b/gdb/std-regs.c index 6078d1ab2b8..9f6f9acb109 100644 --- a/gdb/std-regs.c +++ b/gdb/std-regs.c @@ -74,20 +74,25 @@ value_of_builtin_frame_reg (struct frame_info *frame) static struct value * value_of_builtin_frame_fp_reg (struct frame_info *frame) { -#ifdef FP_REGNUM - if (FP_REGNUM >= 0) - return value_of_register (FP_REGNUM, frame); -#endif - { - struct value *val = allocate_value (builtin_type_void_data_ptr); - char *buf = VALUE_CONTENTS_RAW (val); - if (frame == NULL) - memset (buf, TYPE_LENGTH (VALUE_TYPE (val)), 0); - else - ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf, - get_frame_base (frame)); - return val; - } + if (DEPRECATED_FP_REGNUM >= 0) + /* NOTE: cagney/2003-04-24: Since the mere presence of "fp" in the + register name table overrides this built-in $fp register, there + is no real reason for this DEPRECATED_FP_REGNUM trickery here. + An architecture wanting to implement "$fp" as alias for a raw + register can do so by adding "fp" to register name table (mind + you, doing this is probably a dangerous thing). */ + return value_of_register (DEPRECATED_FP_REGNUM, frame); + else + { + struct value *val = allocate_value (builtin_type_void_data_ptr); + char *buf = VALUE_CONTENTS_RAW (val); + if (frame == NULL) + memset (buf, TYPE_LENGTH (VALUE_TYPE (val)), 0); + else + ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf, + get_frame_base (frame)); + return val; + } } static struct value * diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c index beb84dfc822..6b9d751cf3c 100644 --- a/gdb/v850-tdep.c +++ b/gdb/v850-tdep.c @@ -1226,7 +1226,7 @@ v850_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_num_regs (gdbarch, E_NUM_REGS); set_gdbarch_num_pseudo_regs (gdbarch, 0); set_gdbarch_sp_regnum (gdbarch, E_SP_REGNUM); - set_gdbarch_fp_regnum (gdbarch, E_FP_REGNUM); + set_gdbarch_deprecated_fp_regnum (gdbarch, E_FP_REGNUM); set_gdbarch_pc_regnum (gdbarch, E_PC_REGNUM); set_gdbarch_register_name (gdbarch, v850_register_name); set_gdbarch_register_size (gdbarch, v850_reg_size); @@ -1238,7 +1238,7 @@ v850_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_deprecated_max_register_virtual_size (gdbarch, v850_reg_size); set_gdbarch_register_virtual_type (gdbarch, v850_reg_virtual_type); - set_gdbarch_read_fp (gdbarch, v850_target_read_fp); + set_gdbarch_deprecated_target_read_fp (gdbarch, v850_target_read_fp); /* * Frame Info diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c index c851b50a4aa..4f1fcc9ab2c 100644 --- a/gdb/vax-tdep.c +++ b/gdb/vax-tdep.c @@ -143,12 +143,12 @@ vax_frame_init_saved_regs (struct frame_info *frame) } get_frame_saved_regs (frame)[SP_REGNUM] = next_addr + 4; - if (regmask & (1 << FP_REGNUM)) + if (regmask & (1 << DEPRECATED_FP_REGNUM)) get_frame_saved_regs (frame)[SP_REGNUM] += 4 + (4 * read_memory_integer (next_addr + 4, 4)); get_frame_saved_regs (frame)[PC_REGNUM] = get_frame_base (frame) + 16; - get_frame_saved_regs (frame)[FP_REGNUM] = get_frame_base (frame) + 12; + get_frame_saved_regs (frame)[DEPRECATED_FP_REGNUM] = get_frame_base (frame) + 12; get_frame_saved_regs (frame)[VAX_AP_REGNUM] = get_frame_base (frame) + 8; get_frame_saved_regs (frame)[PS_REGNUM] = get_frame_base (frame) + 4; } @@ -252,19 +252,19 @@ vax_push_dummy_frame (void) for (regnum = 11; regnum >= 0; regnum--) sp = push_word (sp, read_register (regnum)); sp = push_word (sp, read_register (PC_REGNUM)); - sp = push_word (sp, read_register (FP_REGNUM)); + sp = push_word (sp, read_register (DEPRECATED_FP_REGNUM)); sp = push_word (sp, read_register (VAX_AP_REGNUM)); sp = push_word (sp, (read_register (PS_REGNUM) & 0xffef) + 0x2fff0000); sp = push_word (sp, 0); write_register (SP_REGNUM, sp); - write_register (FP_REGNUM, sp); + write_register (DEPRECATED_FP_REGNUM, sp); write_register (VAX_AP_REGNUM, sp + (17 * 4)); } static void vax_pop_frame (void) { - CORE_ADDR fp = read_register (FP_REGNUM); + CORE_ADDR fp = read_register (DEPRECATED_FP_REGNUM); int regnum; int regmask = read_memory_integer (fp + 4, 4); @@ -272,7 +272,7 @@ vax_pop_frame (void) (regmask & 0xffff) | (read_register (PS_REGNUM) & 0xffff0000)); write_register (PC_REGNUM, read_memory_integer (fp + 16, 4)); - write_register (FP_REGNUM, read_memory_integer (fp + 12, 4)); + write_register (DEPRECATED_FP_REGNUM, read_memory_integer (fp + 12, 4)); write_register (VAX_AP_REGNUM, read_memory_integer (fp + 8, 4)); fp += 16; for (regnum = 0; regnum < 12; regnum++) @@ -622,7 +622,7 @@ vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Register info */ set_gdbarch_num_regs (gdbarch, VAX_NUM_REGS); set_gdbarch_sp_regnum (gdbarch, VAX_SP_REGNUM); - set_gdbarch_fp_regnum (gdbarch, VAX_FP_REGNUM); + set_gdbarch_deprecated_fp_regnum (gdbarch, VAX_FP_REGNUM); set_gdbarch_pc_regnum (gdbarch, VAX_PC_REGNUM); set_gdbarch_ps_regnum (gdbarch, VAX_PS_REGNUM); diff --git a/gdb/x86-64-tdep.c b/gdb/x86-64-tdep.c index f3c08e340d5..5872d5411bf 100644 --- a/gdb/x86-64-tdep.c +++ b/gdb/x86-64-tdep.c @@ -935,7 +935,7 @@ x86_64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) /* Register numbers of various important registers. */ set_gdbarch_sp_regnum (gdbarch, 7); /* %rsp */ - set_gdbarch_fp_regnum (gdbarch, 6); /* %rbp */ + set_gdbarch_deprecated_fp_regnum (gdbarch, 6); /* %rbp */ set_gdbarch_pc_regnum (gdbarch, 16); /* %rip */ set_gdbarch_ps_regnum (gdbarch, 17); /* %eflags */ set_gdbarch_fp0_regnum (gdbarch, X86_64_NUM_GREGS); /* %st(0) */ @@ -977,7 +977,7 @@ x86_64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) set_gdbarch_deprecated_get_saved_register (gdbarch, cfi_get_saved_register); /* FIXME: kettenis/20021026: Should we set parm_boundary to 64 here? */ - set_gdbarch_read_fp (gdbarch, cfi_read_fp); + set_gdbarch_deprecated_target_read_fp (gdbarch, cfi_read_fp); set_gdbarch_extract_return_value (gdbarch, x86_64_extract_return_value); diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c index a8045d80736..1ff96a4ec22 100644 --- a/gdb/xstormy16-tdep.c +++ b/gdb/xstormy16-tdep.c @@ -1035,7 +1035,7 @@ xstormy16_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_num_regs (gdbarch, E_NUM_REGS); set_gdbarch_num_pseudo_regs (gdbarch, 0); set_gdbarch_sp_regnum (gdbarch, E_SP_REGNUM); - set_gdbarch_fp_regnum (gdbarch, E_FP_REGNUM); + set_gdbarch_deprecated_fp_regnum (gdbarch, E_FP_REGNUM); set_gdbarch_pc_regnum (gdbarch, E_PC_REGNUM); set_gdbarch_register_name (gdbarch, xstormy16_register_name); set_gdbarch_register_size (gdbarch, xstormy16_reg_size);