From 30a4a8e027d143cca1ac159277d0652c1ed978e9 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Thu, 10 Jun 2004 13:22:07 +0000 Subject: [PATCH] 2004-06-10 Andrew Cagney * gdbarch.sh (DEPRECATED_PC_IN_CALL_DUMMY): Delete. * gdbarch.h, gdbarch.c: Re-generate. * frame.h (deprecated_pc_in_call_dummy): Delete "sp" and "fp" parameters. * dummy-frame.c (deprecated_pc_in_call_dummy): Update. * arm-tdep.c (arm_pc_is_thumb_dummy): Call deprecated_pc_in_call_dummy instead of DEPRECATED_PC_IN_CALL_DUMMY. (arm_skip_prologue): Ditto. * xstormy16-tdep.c (xstormy16_pop_frame, xstormy16_scan_prologue) (xstormy16_frame_saved_pc, xstormy16_frame_chain): Ditto. * v850-tdep.c (v850_find_callers_reg, v850_frame_chain) (v850_pop_frame, v850_frame_saved_pc, v850_frame_init_saved_regs): Ditto. * sh64-tdep.c (sh64_frame_chain, sh64_get_saved_pr) (sh64_init_extra_frame_info, sh64_get_saved_register) (sh64_pop_frame): Ditto. * mips-tdep.c (non_heuristic_proc_desc): Ditto. * mcore-tdep.c (mcore_find_callers_reg, mcore_frame_saved_pc) (mcore_pop_frame, mcore_init_extra_frame_info): Ditto. * h8300-tdep.c (h8300_frame_chain, h8300_frame_saved_pc) (h8300_pop_frame): Ditto. * blockframe.c (legacy_inside_entry_func) (legacy_frame_chain_valid): Ditto. * frame.c (frame_type_from_pc, legacy_get_prev_frame): Update call to deprecated_pc_in_call_dummy. --- gdb/ChangeLog | 29 ++++++++++++++++++++++++++ gdb/arm-tdep.c | 4 ++-- gdb/blockframe.c | 6 ++---- gdb/dummy-frame.c | 4 ++-- gdb/frame.c | 4 ++-- gdb/frame.h | 3 +-- gdb/gdbarch.c | 48 -------------------------------------------- gdb/gdbarch.h | 31 ---------------------------- gdb/gdbarch.sh | 6 ------ gdb/h8300-tdep.c | 12 +++-------- gdb/mcore-tdep.c | 12 ++++------- gdb/mips-tdep.c | 2 +- gdb/sh64-tdep.c | 18 +++++------------ gdb/v850-tdep.c | 15 +++++--------- gdb/xstormy16-tdep.c | 12 ++++------- 15 files changed, 60 insertions(+), 146 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1c7570e5579..415e3e57912 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,32 @@ +2004-06-10 Andrew Cagney + + * gdbarch.sh (DEPRECATED_PC_IN_CALL_DUMMY): Delete. + * gdbarch.h, gdbarch.c: Re-generate. + * frame.h (deprecated_pc_in_call_dummy): Delete "sp" and "fp" + parameters. + * dummy-frame.c (deprecated_pc_in_call_dummy): Update. + * arm-tdep.c (arm_pc_is_thumb_dummy): Call + deprecated_pc_in_call_dummy instead of + DEPRECATED_PC_IN_CALL_DUMMY. + (arm_skip_prologue): Ditto. + * xstormy16-tdep.c (xstormy16_pop_frame, xstormy16_scan_prologue) + (xstormy16_frame_saved_pc, xstormy16_frame_chain): Ditto. + * v850-tdep.c (v850_find_callers_reg, v850_frame_chain) + (v850_pop_frame, v850_frame_saved_pc, v850_frame_init_saved_regs): + Ditto. + * sh64-tdep.c (sh64_frame_chain, sh64_get_saved_pr) + (sh64_init_extra_frame_info, sh64_get_saved_register) + (sh64_pop_frame): Ditto. + * mips-tdep.c (non_heuristic_proc_desc): Ditto. + * mcore-tdep.c (mcore_find_callers_reg, mcore_frame_saved_pc) + (mcore_pop_frame, mcore_init_extra_frame_info): Ditto. + * h8300-tdep.c (h8300_frame_chain, h8300_frame_saved_pc) + (h8300_pop_frame): Ditto. + * blockframe.c (legacy_inside_entry_func) + (legacy_frame_chain_valid): Ditto. + * frame.c (frame_type_from_pc, legacy_get_prev_frame): Update call + to deprecated_pc_in_call_dummy. + 2004-06-09 Andrew Cagney * gdbarch.sh (REGISTER_TO_VALUE, VALUE_TO_REGISTER): Do not diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 9eccbb92673..8122138e373 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -234,7 +234,7 @@ arm_pc_is_thumb_dummy (CORE_ADDR memaddr) frame location (true if we have not pushed large data structures or gone too many levels deep) and that our 1024 is not enough to consider code regions as part of the stack (true for most practical purposes). */ - if (DEPRECATED_PC_IN_CALL_DUMMY (memaddr, sp, sp + 1024)) + if (deprecated_pc_in_call_dummy (memaddr)) return caller_is_thumb; else return 0; @@ -407,7 +407,7 @@ arm_skip_prologue (CORE_ADDR pc) struct symtab_and_line sal; /* If we're in a dummy frame, don't even try to skip the prologue. */ - if (DEPRECATED_PC_IN_CALL_DUMMY (pc, 0, 0)) + if (deprecated_pc_in_call_dummy (pc)) return pc; /* See what the symbol table says. */ diff --git a/gdb/blockframe.c b/gdb/blockframe.c index 428377e688d..cbe367485bb 100644 --- a/gdb/blockframe.c +++ b/gdb/blockframe.c @@ -147,9 +147,7 @@ legacy_inside_entry_func (CORE_ADDR pc) { /* Do not stop backtracing if the program counter is in the call dummy at the entry point. */ - /* FIXME: This won't always work with zeros for the last two - arguments. */ - if (DEPRECATED_PC_IN_CALL_DUMMY (pc, 0, 0)) + if (deprecated_pc_in_call_dummy (pc)) return 0; } @@ -527,7 +525,7 @@ int legacy_frame_chain_valid (CORE_ADDR fp, struct frame_info *fi) { /* Don't prune CALL_DUMMY frames. */ - if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), 0, 0)) + if (deprecated_pc_in_call_dummy (get_frame_pc (fi))) return 1; /* If the new frame pointer is zero, then it isn't valid. */ diff --git a/gdb/dummy-frame.c b/gdb/dummy-frame.c index 2faac714dd1..70630714914 100644 --- a/gdb/dummy-frame.c +++ b/gdb/dummy-frame.c @@ -131,7 +131,7 @@ deprecated_generic_find_dummy_frame (CORE_ADDR pc, CORE_ADDR fp) return deprecated_grub_regcache_for_registers (regcache); } -/* Function: pc_in_call_dummy (pc, sp, fp) +/* Function: pc_in_call_dummy (pc) Return true if the PC falls in a dummy frame created by gdb for an inferior call. The code below which allows DECR_PC_AFTER_BREAK is @@ -139,7 +139,7 @@ deprecated_generic_find_dummy_frame (CORE_ADDR pc, CORE_ADDR fp) subtracted out. */ int -deprecated_pc_in_call_dummy (CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR fp) +deprecated_pc_in_call_dummy (CORE_ADDR pc) { return pc_in_dummy_frame (pc); } diff --git a/gdb/frame.c b/gdb/frame.c index f3e94c90d23..428eb816e81 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -1064,7 +1064,7 @@ frame_type_from_pc (CORE_ADDR pc) { /* NOTE: cagney/2004-05-08: Eliminating this function depends on all architectures being forced to use the frame-unwind code. */ - if (deprecated_pc_in_call_dummy (pc, 0, 0)) + if (deprecated_pc_in_call_dummy (pc)) return DUMMY_FRAME; else return NORMAL_FRAME; @@ -1582,7 +1582,7 @@ legacy_get_prev_frame (struct frame_info *this_frame) has previously set it. This is really somewhat bogus. The initialization, as seen in create_new_frame(), should occur before the INIT function has been called. */ - if (deprecated_pc_in_call_dummy (get_frame_pc (prev), 0, 0)) + if (deprecated_pc_in_call_dummy (get_frame_pc (prev))) prev->type = DUMMY_FRAME; if (prev->type == NORMAL_FRAME) diff --git a/gdb/frame.h b/gdb/frame.h index 55d357cf14d..62eb5da3f77 100644 --- a/gdb/frame.h +++ b/gdb/frame.h @@ -578,8 +578,7 @@ extern CORE_ADDR deprecated_read_register_dummy (CORE_ADDR pc, extern void generic_push_dummy_frame (void); extern void deprecated_pop_dummy_frame (void); -extern int deprecated_pc_in_call_dummy (CORE_ADDR pc, CORE_ADDR sp, - CORE_ADDR fp); +extern int deprecated_pc_in_call_dummy (CORE_ADDR pc); /* NOTE: cagney/2002-06-26: Targets should no longer use this function. Instead, the contents of a dummy frame register can be diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 8640e00b158..156f9c118a4 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -172,7 +172,6 @@ struct gdbarch gdbarch_cannot_fetch_register_ftype *cannot_fetch_register; gdbarch_cannot_store_register_ftype *cannot_store_register; gdbarch_get_longjmp_target_ftype *get_longjmp_target; - gdbarch_deprecated_pc_in_call_dummy_ftype *deprecated_pc_in_call_dummy; gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc; int believe_pcc_promotion; gdbarch_deprecated_get_saved_register_ftype *deprecated_get_saved_register; @@ -322,7 +321,6 @@ struct gdbarch startup_gdbarch = 0, /* cannot_fetch_register */ 0, /* cannot_store_register */ 0, /* get_longjmp_target */ - deprecated_pc_in_call_dummy, /* deprecated_pc_in_call_dummy */ 0, /* deprecated_init_frame_pc */ 0, /* believe_pcc_promotion */ 0, /* deprecated_get_saved_register */ @@ -462,7 +460,6 @@ gdbarch_alloc (const struct gdbarch_info *info, current_gdbarch->register_sim_regno = legacy_register_sim_regno; current_gdbarch->cannot_fetch_register = cannot_register_not; current_gdbarch->cannot_store_register = cannot_register_not; - current_gdbarch->deprecated_pc_in_call_dummy = deprecated_pc_in_call_dummy; current_gdbarch->convert_register_p = generic_convert_register_p; current_gdbarch->pointer_to_address = unsigned_pointer_to_address; current_gdbarch->address_to_pointer = unsigned_address_to_pointer; @@ -605,7 +602,6 @@ verify_gdbarch (struct gdbarch *current_gdbarch) /* Skip verify of cannot_fetch_register, invalid_p == 0 */ /* Skip verify of cannot_store_register, invalid_p == 0 */ /* Skip verify of get_longjmp_target, has predicate */ - /* Skip verify of deprecated_pc_in_call_dummy, has predicate */ /* Skip verify of deprecated_init_frame_pc, has predicate */ /* Skip verify of deprecated_get_saved_register, has predicate */ /* Skip verify of convert_register_p, invalid_p == 0 */ @@ -1189,25 +1185,6 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file) "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE = %d\n", DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE); #endif -#ifdef DEPRECATED_PC_IN_CALL_DUMMY_P - fprintf_unfiltered (file, - "gdbarch_dump: %s # %s\n", - "DEPRECATED_PC_IN_CALL_DUMMY_P()", - XSTRING (DEPRECATED_PC_IN_CALL_DUMMY_P ())); - fprintf_unfiltered (file, - "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY_P() = %d\n", - DEPRECATED_PC_IN_CALL_DUMMY_P ()); -#endif -#ifdef DEPRECATED_PC_IN_CALL_DUMMY - fprintf_unfiltered (file, - "gdbarch_dump: %s # %s\n", - "DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address)", - XSTRING (DEPRECATED_PC_IN_CALL_DUMMY (pc, sp, frame_address))); - fprintf_unfiltered (file, - "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY = <0x%08lx>\n", - (long) current_gdbarch->deprecated_pc_in_call_dummy - /*DEPRECATED_PC_IN_CALL_DUMMY ()*/); -#endif #ifdef DEPRECATED_POP_FRAME_P fprintf_unfiltered (file, "gdbarch_dump: %s # %s\n", @@ -3354,31 +3331,6 @@ set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch, gdbarch->get_longjmp_target = get_longjmp_target; } -int -gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch *gdbarch) -{ - gdb_assert (gdbarch != NULL); - return gdbarch->deprecated_pc_in_call_dummy != deprecated_pc_in_call_dummy; -} - -int -gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address) -{ - gdb_assert (gdbarch != NULL); - gdb_assert (gdbarch->deprecated_pc_in_call_dummy != NULL); - /* Do not check predicate: gdbarch->deprecated_pc_in_call_dummy != deprecated_pc_in_call_dummy, allow call. */ - if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pc_in_call_dummy called\n"); - return gdbarch->deprecated_pc_in_call_dummy (pc, sp, frame_address); -} - -void -set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, - gdbarch_deprecated_pc_in_call_dummy_ftype deprecated_pc_in_call_dummy) -{ - gdbarch->deprecated_pc_in_call_dummy = deprecated_pc_in_call_dummy; -} - int gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch) { diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 5cd038b41b9..6a0dbaa0237 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -959,37 +959,6 @@ extern void set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch, gdbarch_get #define GET_LONGJMP_TARGET(pc) (gdbarch_get_longjmp_target (current_gdbarch, pc)) #endif -/* NOTE: cagney/2002-11-24: This function with predicate has a valid - (callable) initial value. As a consequence, even when the predicate - is false, the corresponding function works. This simplifies the - migration process - old code, calling DEPRECATED_PC_IN_CALL_DUMMY(), - doesn't need to be modified. */ - -#if defined (DEPRECATED_PC_IN_CALL_DUMMY) -/* Legacy for systems yet to multi-arch DEPRECATED_PC_IN_CALL_DUMMY */ -#if !defined (DEPRECATED_PC_IN_CALL_DUMMY_P) -#define DEPRECATED_PC_IN_CALL_DUMMY_P() (1) -#endif -#endif - -extern int gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch *gdbarch); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PC_IN_CALL_DUMMY_P) -#error "Non multi-arch definition of DEPRECATED_PC_IN_CALL_DUMMY" -#endif -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PC_IN_CALL_DUMMY_P) -#define DEPRECATED_PC_IN_CALL_DUMMY_P() (gdbarch_deprecated_pc_in_call_dummy_p (current_gdbarch)) -#endif - -typedef int (gdbarch_deprecated_pc_in_call_dummy_ftype) (CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address); -extern int gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address); -extern void set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, gdbarch_deprecated_pc_in_call_dummy_ftype *deprecated_pc_in_call_dummy); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PC_IN_CALL_DUMMY) -#error "Non multi-arch definition of DEPRECATED_PC_IN_CALL_DUMMY" -#endif -#if !defined (DEPRECATED_PC_IN_CALL_DUMMY) -#define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) (gdbarch_deprecated_pc_in_call_dummy (current_gdbarch, pc, sp, frame_address)) -#endif - #if defined (DEPRECATED_INIT_FRAME_PC) /* Legacy for systems yet to multi-arch DEPRECATED_INIT_FRAME_PC */ #if !defined (DEPRECATED_INIT_FRAME_PC_P) diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 5f3cc56729e..666d449e773 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -539,12 +539,6 @@ f:2:CANNOT_FETCH_REGISTER:int:cannot_fetch_register:int regnum:regnum:::cannot_r f:2:CANNOT_STORE_REGISTER:int:cannot_store_register:int regnum:regnum:::cannot_register_not::0 # setjmp/longjmp support. F:2:GET_LONGJMP_TARGET:int:get_longjmp_target:CORE_ADDR *pc:pc -# NOTE: cagney/2002-11-24: This function with predicate has a valid -# (callable) initial value. As a consequence, even when the predicate -# is false, the corresponding function works. This simplifies the -# migration process - old code, calling DEPRECATED_PC_IN_CALL_DUMMY(), -# doesn't need to be modified. -F::DEPRECATED_PC_IN_CALL_DUMMY:int:deprecated_pc_in_call_dummy:CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address:pc, sp, frame_address::deprecated_pc_in_call_dummy:deprecated_pc_in_call_dummy F:2:DEPRECATED_INIT_FRAME_PC:CORE_ADDR:deprecated_init_frame_pc:int fromleaf, struct frame_info *prev:fromleaf, prev # v:2:BELIEVE_PCC_PROMOTION:int:believe_pcc_promotion::::::: diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c index b0c21ec6572..1534a80d2c7 100644 --- a/gdb/h8300-tdep.c +++ b/gdb/h8300-tdep.c @@ -519,9 +519,7 @@ h8300_frame_init_saved_regs (struct frame_info *fi) static CORE_ADDR h8300_frame_chain (struct frame_info *thisframe) { - if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (thisframe), - get_frame_base (thisframe), - get_frame_base (thisframe))) + if (deprecated_pc_in_call_dummy (get_frame_pc (thisframe))) { /* initialize the from_pc now */ get_frame_extra_info (thisframe)->from_pc = deprecated_read_register_dummy (get_frame_pc (thisframe), @@ -540,9 +538,7 @@ h8300_frame_chain (struct frame_info *thisframe) static CORE_ADDR h8300_frame_saved_pc (struct frame_info *frame) { - if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), - get_frame_base (frame), - get_frame_base (frame))) + if (deprecated_pc_in_call_dummy (get_frame_pc (frame))) return deprecated_read_register_dummy (get_frame_pc (frame), get_frame_base (frame), E_PC_REGNUM); @@ -739,9 +735,7 @@ h8300_pop_frame (void) unsigned regno; struct frame_info *frame = get_current_frame (); - if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), - get_frame_base (frame), - get_frame_base (frame))) + if (deprecated_pc_in_call_dummy (get_frame_pc (frame))) { deprecated_pop_dummy_frame (); } diff --git a/gdb/mcore-tdep.c b/gdb/mcore-tdep.c index 50aa2c5580c..3f60e26fdf1 100644 --- a/gdb/mcore-tdep.c +++ b/gdb/mcore-tdep.c @@ -713,8 +713,7 @@ mcore_find_callers_reg (struct frame_info *fi, int regnum) { for (; fi != NULL; fi = get_next_frame (fi)) { - if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi), - get_frame_base (fi))) + if (deprecated_pc_in_call_dummy (get_frame_pc (fi))) return deprecated_read_register_dummy (get_frame_pc (fi), get_frame_base (fi), regnum); else if (deprecated_get_frame_saved_regs (fi)[regnum] != 0) @@ -731,8 +730,7 @@ static CORE_ADDR mcore_frame_saved_pc (struct frame_info * fi) { - if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi), - get_frame_base (fi))) + if (deprecated_pc_in_call_dummy (get_frame_pc (fi))) return deprecated_read_register_dummy (get_frame_pc (fi), get_frame_base (fi), PC_REGNUM); else @@ -750,8 +748,7 @@ mcore_pop_frame (void) int rn; struct frame_info *fi = get_current_frame (); - if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi), - get_frame_base (fi))) + if (deprecated_pc_in_call_dummy (get_frame_pc (fi))) deprecated_pop_dummy_frame (); else { @@ -995,8 +992,7 @@ mcore_init_extra_frame_info (int fromleaf, struct frame_info *fi) get_frame_extra_info (fi)->status = 0; get_frame_extra_info (fi)->framesize = 0; - if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi), - get_frame_base (fi))) + if (deprecated_pc_in_call_dummy (get_frame_pc (fi))) { /* We need to setup fi->frame here because call_function_by_hand gets it wrong by assuming it's always FP. */ diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index c6deb802170..f750e81912e 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -2305,7 +2305,7 @@ non_heuristic_proc_desc (CORE_ADDR pc, CORE_ADDR *addrptr) struct obj_section *sec; struct mips_objfile_private *priv; - if (DEPRECATED_PC_IN_CALL_DUMMY (pc, 0, 0)) + if (deprecated_pc_in_call_dummy (pc)) return NULL; find_pc_partial_function (pc, NULL, &startaddr, NULL); diff --git a/gdb/sh64-tdep.c b/gdb/sh64-tdep.c index f1dc7b44986..217422ef6d3 100644 --- a/gdb/sh64-tdep.c +++ b/gdb/sh64-tdep.c @@ -736,9 +736,7 @@ translate_insn_rn (int rn, int media_mode) static CORE_ADDR sh64_frame_chain (struct frame_info *frame) { - if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), - get_frame_base (frame), - get_frame_base (frame))) + if (deprecated_pc_in_call_dummy (get_frame_pc (frame))) return get_frame_base (frame); /* dummy frame same as caller's frame */ if (get_frame_pc (frame)) { @@ -764,8 +762,7 @@ sh64_get_saved_pr (struct frame_info *fi, int pr_regnum) int media_mode = 0; for (; fi; fi = get_next_frame (fi)) - if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi), - get_frame_base (fi))) + if (deprecated_pc_in_call_dummy (get_frame_pc (fi))) /* When the caller requests PR from the dummy frame, we return PC because that's where the previous routine appears to have done a call from. */ @@ -1214,8 +1211,7 @@ sh64_init_extra_frame_info (int fromleaf, struct frame_info *fi) if (get_next_frame (fi)) deprecated_update_frame_pc_hack (fi, DEPRECATED_FRAME_SAVED_PC (get_next_frame (fi))); - if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi), - get_frame_base (fi))) + if (deprecated_pc_in_call_dummy (get_frame_pc (fi))) { /* We need to setup fi->frame here because call_function_by_hand gets it wrong by assuming it's always FP. */ @@ -1272,9 +1268,7 @@ sh64_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp, while (frame && ((frame = get_next_frame (frame)) != NULL)) { - if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), - get_frame_base (frame), - get_frame_base (frame))) + if (deprecated_pc_in_call_dummy (get_frame_pc (frame))) { if (lval) /* found it in a CALL_DUMMY frame */ *lval = not_lval; @@ -1369,9 +1363,7 @@ sh64_pop_frame (void) int media_mode = pc_is_isa32 (get_frame_pc (frame)); - if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), - get_frame_base (frame), - get_frame_base (frame))) + if (deprecated_pc_in_call_dummy (get_frame_pc (frame))) deprecated_pop_dummy_frame (); else { diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c index 862ebb3c1c1..d15dacdc583 100644 --- a/gdb/v850-tdep.c +++ b/gdb/v850-tdep.c @@ -797,8 +797,7 @@ static CORE_ADDR v850_find_callers_reg (struct frame_info *fi, int regnum) { for (; fi; fi = get_next_frame (fi)) - if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi), - get_frame_base (fi))) + if (deprecated_pc_in_call_dummy (get_frame_pc (fi))) return deprecated_read_register_dummy (get_frame_pc (fi), get_frame_base (fi), regnum); else if (deprecated_get_frame_saved_regs (fi)[regnum] != 0) @@ -825,7 +824,7 @@ v850_frame_chain (struct frame_info *fi) callers_pc = DEPRECATED_FRAME_SAVED_PC (fi); /* If caller is a call-dummy, then our FP bears no relation to his FP! */ fp = v850_find_callers_reg (fi, E_FP_RAW_REGNUM); - if (DEPRECATED_PC_IN_CALL_DUMMY (callers_pc, fp, fp)) + if (deprecated_pc_in_call_dummy (callers_pc)) return fp; /* caller is call-dummy: return oldest value of FP */ /* Caller is NOT a call-dummy, so everything else should just work. @@ -882,9 +881,7 @@ v850_pop_frame (void) struct frame_info *frame = get_current_frame (); int regnum; - if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), - get_frame_base (frame), - get_frame_base (frame))) + if (deprecated_pc_in_call_dummy (get_frame_pc (frame))) deprecated_pop_dummy_frame (); else { @@ -1010,8 +1007,7 @@ v850_push_return_address (CORE_ADDR pc, CORE_ADDR sp) static CORE_ADDR v850_frame_saved_pc (struct frame_info *fi) { - if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi), - get_frame_base (fi))) + if (deprecated_pc_in_call_dummy (get_frame_pc (fi))) return deprecated_read_register_dummy (get_frame_pc (fi), get_frame_base (fi), E_PC_REGNUM); else @@ -1086,8 +1082,7 @@ v850_frame_init_saved_regs (struct frame_info *fi) /* The call dummy doesn't save any registers on the stack, so we can return now. */ - if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi), - get_frame_base (fi))) + if (deprecated_pc_in_call_dummy (get_frame_pc (fi))) return; /* Find the beginning of this function, so we can analyze its diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c index 765dcf1ae57..760e34fc3a0 100644 --- a/gdb/xstormy16-tdep.c +++ b/gdb/xstormy16-tdep.c @@ -423,8 +423,7 @@ xstormy16_pop_frame (void) if (fi == NULL) return; /* paranoia */ - if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi), - get_frame_base (fi))) + if (deprecated_pc_in_call_dummy (get_frame_pc (fi))) { deprecated_pop_dummy_frame (); } @@ -560,8 +559,7 @@ xstormy16_scan_prologue (CORE_ADDR start_addr, CORE_ADDR end_addr, if (fi) { /* In a call dummy, don't touch the frame. */ - if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi), - get_frame_base (fi))) + if (deprecated_pc_in_call_dummy (get_frame_pc (fi))) return start_addr; /* Grab the frame-relative values of SP and FP, needed below. @@ -849,8 +847,7 @@ xstormy16_frame_saved_pc (struct frame_info *fi) { CORE_ADDR saved_pc; - if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi), - get_frame_base (fi))) + if (deprecated_pc_in_call_dummy (get_frame_pc (fi))) { saved_pc = deprecated_read_register_dummy (get_frame_pc (fi), get_frame_base (fi), @@ -911,8 +908,7 @@ xstormy16_init_extra_frame_info (int fromleaf, struct frame_info *fi) static CORE_ADDR xstormy16_frame_chain (struct frame_info *fi) { - if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi), - get_frame_base (fi))) + if (deprecated_pc_in_call_dummy (get_frame_pc (fi))) { /* Call dummy's frame is the same as caller's. */ return get_frame_base (fi); -- 2.30.2