diff options
author | Andrew Cagney <cagney@redhat.com> | 2002-12-11 02:26:38 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2002-12-11 02:26:38 +0000 |
commit | a5afb99fc1bc3708dafc1201ff30bd263ec2b266 (patch) | |
tree | d6c05aa3caa8b22cae11a541c167282249db6c3d /gdb/gdbarch.c | |
parent | 6604731ba7c2a5b3bffcf6ff2831b77ff09a92aa (diff) | |
download | gdb-a5afb99fc1bc3708dafc1201ff30bd263ec2b266.zip gdb-a5afb99fc1bc3708dafc1201ff30bd263ec2b266.tar.gz gdb-a5afb99fc1bc3708dafc1201ff30bd263ec2b266.tar.bz2 |
2002-12-10 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (DEPRECATED_INIT_FRAME_PC): Rename INIT_FRAME_PC.
Change to a function with predicate.
* gdbarch.h, gdbarch.c: Re-generate.
* frame.c (get_prev_frame): Update. Test
DEPRECATED_INIT_FRAME_PC_P.
* config/sparc/tm-sparc.h (DEPRECATED_INIT_FRAME_PC): Update.
* config/rs6000/tm-rs6000.h (DEPRECATED_INIT_FRAME_PC): Update.
* config/mn10200/tm-mn10200.h (DEPRECATED_INIT_FRAME_PC): Update.
* alpha-tdep.c (alpha_gdbarch_init): Update.
* mn10300-tdep.c (mn10300_gdbarch_init): Update.
* mips-tdep.c (mips_gdbarch_init): Update.
* i386-interix-tdep.c (i386_interix_init_abi): Update.
* arm-tdep.c: Update comments.
* h8300-tdep.c (h8300_gdbarch_init): Explicitly set init_frame_pc.
* config/m32r/tm-m32r.h (DEPRECATED_INIT_FRAME_PC): Ditto.
* frv-tdep.c (frv_gdbarch_init): Ditto.
* x86-64-tdep.c (x86_64_init_abi): Ditto.
* ia64-tdep.c (ia64_gdbarch_init): Ditto.
* s390-tdep.c (s390_gdbarch_init): Ditto.
* v850-tdep.c (v850_gdbarch_init): Ditto.
* vax-tdep.c (vax_gdbarch_init): Ditto.
* sh-tdep.c (sh_gdbarch_init): Ditto.
* ns32k-tdep.c (ns32k_gdbarch_init): Ditto.
* m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
* mcore-tdep.c (mcore_gdbarch_init): Ditto.
* xstormy16-tdep.c (xstormy16_gdbarch_init): Ditto.
* i386-tdep.c (i386_gdbarch_init): Ditto.
* d10v-tdep.c (d10v_gdbarch_init): Ditto.
* cris-tdep.c (cris_gdbarch_init): Ditto.
* avr-tdep.c (avr_gdbarch_init): Ditto.
* arm-tdep.c (arm_gdbarch_init): Ditto.
* config/z8k/tm-z8k.h (INIT_FRAME_PC_FIRST): Delete macro.
(DEPRECATED_INIT_FRAME_PC): Rename INIT_FRAME_PC.
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r-- | gdb/gdbarch.c | 59 |
1 files changed, 37 insertions, 22 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 999f32c..03a4ae3 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -196,7 +196,7 @@ struct gdbarch int call_dummy_stack_adjust; gdbarch_fix_call_dummy_ftype *fix_call_dummy; gdbarch_deprecated_init_frame_pc_first_ftype *deprecated_init_frame_pc_first; - gdbarch_init_frame_pc_ftype *init_frame_pc; + gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc; int believe_pcc_promotion; int believe_pcc_promotion_type; gdbarch_coerce_float_to_double_ftype *coerce_float_to_double; @@ -533,7 +533,6 @@ gdbarch_alloc (const struct gdbarch_info *info, current_gdbarch->call_dummy_words = legacy_call_dummy_words; current_gdbarch->sizeof_call_dummy_words = legacy_sizeof_call_dummy_words; current_gdbarch->call_dummy_stack_adjust_p = -1; - current_gdbarch->init_frame_pc = init_frame_pc_default; current_gdbarch->coerce_float_to_double = default_coerce_float_to_double; current_gdbarch->register_convertible = generic_register_convertible_not; current_gdbarch->convert_register_p = legacy_convert_register_p; @@ -712,7 +711,7 @@ verify_gdbarch (struct gdbarch *gdbarch) && (gdbarch->fix_call_dummy == 0)) fprintf_unfiltered (log, "\n\tfix_call_dummy"); /* Skip verify of deprecated_init_frame_pc_first, has predicate */ - /* Skip verify of init_frame_pc, invalid_p == 0 */ + /* Skip verify of deprecated_init_frame_pc, has predicate */ /* Skip verify of coerce_float_to_double, invalid_p == 0 */ /* Skip verify of get_saved_register, has predicate */ /* Skip verify of register_convertible, invalid_p == 0 */ @@ -1192,6 +1191,26 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) (long) current_gdbarch->deprecated_extract_struct_value_address /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/); #endif +#ifdef DEPRECATED_INIT_FRAME_PC_P + fprintf_unfiltered (file, + "gdbarch_dump: %s # %s\n", + "DEPRECATED_INIT_FRAME_PC_P()", + XSTRING (DEPRECATED_INIT_FRAME_PC_P ())); + fprintf_unfiltered (file, + "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_P() = %d\n", + DEPRECATED_INIT_FRAME_PC_P ()); +#endif +#ifdef DEPRECATED_INIT_FRAME_PC + fprintf_unfiltered (file, + "gdbarch_dump: %s # %s\n", + "DEPRECATED_INIT_FRAME_PC(fromleaf, prev)", + XSTRING (DEPRECATED_INIT_FRAME_PC (fromleaf, prev))); + if (GDB_MULTI_ARCH) + fprintf_unfiltered (file, + "gdbarch_dump: DEPRECATED_INIT_FRAME_PC = <0x%08lx>\n", + (long) current_gdbarch->deprecated_init_frame_pc + /*DEPRECATED_INIT_FRAME_PC ()*/); +#endif #ifdef DEPRECATED_INIT_FRAME_PC_FIRST_P fprintf_unfiltered (file, "gdbarch_dump: %s # %s\n", @@ -1577,17 +1596,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) (long) current_gdbarch->init_extra_frame_info /*INIT_EXTRA_FRAME_INFO ()*/); #endif -#ifdef INIT_FRAME_PC - fprintf_unfiltered (file, - "gdbarch_dump: %s # %s\n", - "INIT_FRAME_PC(fromleaf, prev)", - XSTRING (INIT_FRAME_PC (fromleaf, prev))); - if (GDB_MULTI_ARCH) - fprintf_unfiltered (file, - "gdbarch_dump: INIT_FRAME_PC = <0x%08lx>\n", - (long) current_gdbarch->init_frame_pc - /*INIT_FRAME_PC ()*/); -#endif #ifdef INNER_THAN fprintf_unfiltered (file, "gdbarch_dump: %s # %s\n", @@ -3804,23 +3812,30 @@ set_gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, gdbarch->deprecated_init_frame_pc_first = deprecated_init_frame_pc_first; } +int +gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch) +{ + gdb_assert (gdbarch != NULL); + return gdbarch->deprecated_init_frame_pc != 0; +} + CORE_ADDR -gdbarch_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev) +gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev) { gdb_assert (gdbarch != NULL); - if (gdbarch->init_frame_pc == 0) + if (gdbarch->deprecated_init_frame_pc == 0) internal_error (__FILE__, __LINE__, - "gdbarch: gdbarch_init_frame_pc invalid"); + "gdbarch: gdbarch_deprecated_init_frame_pc invalid"); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_init_frame_pc called\n"); - return gdbarch->init_frame_pc (fromleaf, prev); + fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc called\n"); + return gdbarch->deprecated_init_frame_pc (fromleaf, prev); } void -set_gdbarch_init_frame_pc (struct gdbarch *gdbarch, - gdbarch_init_frame_pc_ftype init_frame_pc) +set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, + gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc) { - gdbarch->init_frame_pc = init_frame_pc; + gdbarch->deprecated_init_frame_pc = deprecated_init_frame_pc; } int |