From 1c3545aea9b4e7106e736ed3f6908e5a5d42d015 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sat, 31 May 2003 16:49:18 +0000 Subject: [PATCH] * i386-tdep.c (i386_sigtramp_frame_p): Only handle frames if we have a sigcontext_addr handler. * x86-64-tdep.c (x86_64_sigtramp_frame_p): Assert that we have a sigcontext_addr handler. --- gdb/ChangeLog | 7 +++++++ gdb/i386-tdep.c | 5 +++++ gdb/x86-64-tdep.c | 6 +++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e00935dcf4d..94080f73d43 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2003-05-31 Mark Kettenis + + * i386-tdep.c (i386_sigtramp_frame_p): Only handle frames if we + have a sigcontext_addr handler. + * x86-64-tdep.c (x86_64_sigtramp_frame_p): Assert that we have a + sigcontext_addr handler. + 2003-05-31 Andrew Cagney * mips-tdep.c (print_gp_register_row): Replace do_gp_register_row. diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 1cbe0437f0c..c03df8e7435 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -930,6 +930,11 @@ i386_sigtramp_frame_p (CORE_ADDR pc) { char *name; + /* We shouldn't even bother to try if the OSABI didn't register + a sigcontext_addr handler. */ + if (!gdbarch_tdep (current_gdbarch)->sigcontext_addr) + return NULL; + find_pc_partial_function (pc, &name, NULL, NULL); if (PC_IN_SIGTRAMP (pc, name)) return &i386_sigtramp_frame_unwind; diff --git a/gdb/x86-64-tdep.c b/gdb/x86-64-tdep.c index 7bcabfd72ba..a33d33ae03d 100644 --- a/gdb/x86-64-tdep.c +++ b/gdb/x86-64-tdep.c @@ -1094,7 +1094,11 @@ x86_64_sigtramp_frame_p (CORE_ADDR pc) find_pc_partial_function (pc, &name, NULL, NULL); if (PC_IN_SIGTRAMP (pc, name)) - return &x86_64_sigtramp_frame_unwind; + { + gdb_assert (gdbarch_tdep (current_gdbarch)->sigcontext_addr); + + return &x86_64_sigtramp_frame_unwind; + } return NULL; } -- 2.30.2