diff options
Diffstat (limited to 'gdb/amd64-tdep.c')
-rw-r--r-- | gdb/amd64-tdep.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c index 1a66e45..0bec555 100644 --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c @@ -967,15 +967,26 @@ static const struct frame_unwind amd64_sigtramp_frame_unwind = static const struct frame_unwind * amd64_sigtramp_frame_sniffer (struct frame_info *next_frame) { - CORE_ADDR pc = frame_pc_unwind (next_frame); - char *name; + struct gdbarch_tdep *tdep = gdbarch_tdep (get_frame_arch (next_frame)); + + /* We shouldn't even bother if we don't have a sigcontext_addr + handler. */ + if (tdep->sigcontext_addr == NULL) + return NULL; + + if (tdep->sigtramp_p != NULL) + { + if (tdep->sigtramp_p (next_frame)) + return &amd64_sigtramp_frame_unwind; + } - find_pc_partial_function (pc, &name, NULL, NULL); - if (DEPRECATED_PC_IN_SIGTRAMP (pc, name)) + if (tdep->sigtramp_start != 0) { - gdb_assert (gdbarch_tdep (current_gdbarch)->sigcontext_addr); + CORE_ADDR pc = frame_pc_unwind (next_frame); - return &amd64_sigtramp_frame_unwind; + gdb_assert (tdep->sigtramp_end != 0); + if (pc >= tdep->sigtramp_start && pc < tdep->sigtramp_end) + return &amd64_sigtramp_frame_unwind; } return NULL; |