From 4eb4b87e13548a3cdf14f779d52dd51f50bff5e6 Mon Sep 17 00:00:00 2001 From: Mark Alexander Date: Thu, 3 Apr 1997 19:43:39 +0000 Subject: * mips-tdep.c (mips_in_call_stub, mips_in_return_stub, mips_skip_stub, mips_ignore_helper): New functions for dealing with MIPS16 call/return thunks. (mips_init_frame_pc_first): New function to implement INIT_FRAME_PC_FIRST macro; includes code from old macro plus new code to skip over MIPS16 thunks. (mips_frame_chain): Skip over MIPS16 thunks. * config/mips/tm-mips.h (mips_in_call_stub, mips_in_return_stub, mips_skip_stub, mips_ignore_helper): Declare. (IN_SOLIB_CALL_TRAMPOLINE, IN_SOLIB_RETURN_TRAMPOLINE, SKIP_TRAMPOLINE_CODE, IGNORE_HELPER_CALL): New macros that invoke the above functions. (INIT_FRAME_PC_FIRST): Change to invoke mips_init_frame_pc. (mips_init_frame_pc): Declare. * infrun.c (wait_for_inferior): Use new IGNORE_HELPER_CALL macro to decide if certain library function calls should be ignored. --- gdb/config/mips/tm-mips.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'gdb/config/mips/tm-mips.h') diff --git a/gdb/config/mips/tm-mips.h b/gdb/config/mips/tm-mips.h index 64a26b5..e052810 100644 --- a/gdb/config/mips/tm-mips.h +++ b/gdb/config/mips/tm-mips.h @@ -425,8 +425,8 @@ extern void mips_pop_frame PARAMS ((void)); #define INIT_FRAME_PC(fromleaf, prev) /* nada */ #define INIT_FRAME_PC_FIRST(fromleaf, prev) \ - (prev)->pc = ((fromleaf) ? SAVED_PC_AFTER_CALL ((prev)->next) : \ - (prev)->next ? FRAME_SAVED_PC ((prev)->next) : read_pc ()); + mips_init_frame_pc_first(fromleaf, prev) +extern void mips_init_frame_pc_first PARAMS ((int, struct frame_info *)); /* Special symbol found in blocks associated with routines. We can hang mips_extra_func_info_t's off of this. */ @@ -505,6 +505,16 @@ extern void fixup_sigtramp PARAMS ((void)); /* Defined in mips-tdep.c and used in remote-mips.c */ extern char *mips_read_processor_type PARAMS ((void)); +/* Functions for dealing with MIPS16 call and return stubs. */ +#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) mips_in_call_stub (pc, name) +#define IN_SOLIB_RETURN_TRAMPOLINE(pc, name) mips_in_return_stub (pc, name) +#define SKIP_TRAMPOLINE_CODE(pc) mips_skip_stub (pc) +#define IGNORE_HELPER_CALL(pc) mips_ignore_helper (pc) +extern int mips_in_call_stub PARAMS ((CORE_ADDR pc, char *name)); +extern int mips_in_return_stub PARAMS ((CORE_ADDR pc, char *name)); +extern CORE_ADDR mips_skip_stub PARAMS ((CORE_ADDR pc)); +extern int mips_ignore_helper PARAMS ((CORE_ADDR pc)); + #ifndef TARGET_MIPS #define TARGET_MIPS #endif -- cgit v1.1