From: Andrew Cagney Date: Fri, 13 Sep 2002 23:21:45 +0000 (+0000) Subject: 2002-09-13 Andrew Cagney X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e76cff22f1fca12ce2a57e1782031b5eb07da6b3;p=binutils-gdb.git 2002-09-13 Andrew Cagney * gdbarch.sh (SIGTRAMP_END): Change to a predicate function. * gdbarch.h, gdbarch.c: Regenerate. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fc6535f08c1..589e584c226 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2002-09-13 Andrew Cagney + + * gdbarch.sh (SIGTRAMP_END): Change to a predicate function. + * gdbarch.h, gdbarch.c: Regenerate. + 2002-09-13 Andrew Cagney * frame.c (find_saved_register): Delete function. diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index c0b0b3a9242..57667515911 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -794,7 +794,7 @@ verify_gdbarch (struct gdbarch *gdbarch) /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */ /* Skip verify of pc_in_sigtramp, invalid_p == 0 */ /* Skip verify of sigtramp_start, has predicate */ - /* Skip verify of sigtramp_end, invalid_p == 0 */ + /* Skip verify of sigtramp_end, has predicate */ /* Skip verify of in_function_epilogue_p, invalid_p == 0 */ /* Skip verify of construct_inferior_arguments, invalid_p == 0 */ /* Skip verify of dwarf2_build_frame_info, has predicate */ @@ -4846,6 +4846,13 @@ set_gdbarch_sigtramp_start (struct gdbarch *gdbarch, gdbarch->sigtramp_start = sigtramp_start; } +int +gdbarch_sigtramp_end_p (struct gdbarch *gdbarch) +{ + gdb_assert (gdbarch != NULL); + return gdbarch->sigtramp_end != 0; +} + CORE_ADDR gdbarch_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc) { diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 246b4da53fa..15bed4ca0e7 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -2422,6 +2422,31 @@ extern void set_gdbarch_sigtramp_start (struct gdbarch *gdbarch, gdbarch_sigtram #endif #endif +#if defined (SIGTRAMP_END) +/* Legacy for systems yet to multi-arch SIGTRAMP_END */ +#if !defined (SIGTRAMP_END_P) +#define SIGTRAMP_END_P() (1) +#endif +#endif + +/* Default predicate for non- multi-arch targets. */ +#if (!GDB_MULTI_ARCH) && !defined (SIGTRAMP_END_P) +#define SIGTRAMP_END_P() (0) +#endif + +extern int gdbarch_sigtramp_end_p (struct gdbarch *gdbarch); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_END_P) +#error "Non multi-arch definition of SIGTRAMP_END" +#endif +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SIGTRAMP_END_P) +#define SIGTRAMP_END_P() (gdbarch_sigtramp_end_p (current_gdbarch)) +#endif + +/* Default (function) for non- multi-arch platforms. */ +#if (!GDB_MULTI_ARCH) && !defined (SIGTRAMP_END) +#define SIGTRAMP_END(pc) (internal_error (__FILE__, __LINE__, "SIGTRAMP_END"), 0) +#endif + typedef CORE_ADDR (gdbarch_sigtramp_end_ftype) (CORE_ADDR pc); extern CORE_ADDR gdbarch_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc); extern void set_gdbarch_sigtramp_end (struct gdbarch *gdbarch, gdbarch_sigtramp_end_ftype *sigtramp_end); diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 6bf7465e777..1058f7c6b5e 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -637,7 +637,7 @@ f:2:IN_SOLIB_RETURN_TRAMPOLINE:int:in_solib_return_trampoline:CORE_ADDR pc, char # does not. f:2:PC_IN_SIGTRAMP:int:pc_in_sigtramp:CORE_ADDR pc, char *name:pc, name:::legacy_pc_in_sigtramp::0 F:2:SIGTRAMP_START:CORE_ADDR:sigtramp_start:CORE_ADDR pc:pc -f:2:SIGTRAMP_END:CORE_ADDR:sigtramp_end:CORE_ADDR pc:pc:::::0 +F::SIGTRAMP_END:CORE_ADDR:sigtramp_end:CORE_ADDR pc:pc # A target might have problems with watchpoints as soon as the stack # frame of the current function has been destroyed. This mostly happens # as the first action in a funtion's epilogue. in_function_epilogue_p()