summaryrefslogtreecommitdiff
path: root/gdb/alphanbsd-tdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/alphanbsd-tdep.c')
-rw-r--r--gdb/alphanbsd-tdep.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/gdb/alphanbsd-tdep.c b/gdb/alphanbsd-tdep.c
index 519d8164ca3..bc7b1a410db 100644
--- a/gdb/alphanbsd-tdep.c
+++ b/gdb/alphanbsd-tdep.c
@@ -21,6 +21,7 @@
#include "defs.h"
#include "gdbcore.h"
+#include "frame.h"
#include "regcache.h"
#include "value.h"
@@ -178,7 +179,31 @@ alphanbsd_sigtramp_offset (CORE_ADDR pc)
static int
alphanbsd_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
{
- return (alphanbsd_sigtramp_offset (pc) >= 0);
+ return (nbsd_pc_in_sigtramp (pc, func_name)
+ || alphanbsd_sigtramp_offset (pc) >= 0);
+}
+
+static CORE_ADDR
+alphanbsd_sigcontext_addr (struct frame_info *frame)
+{
+ /* FIXME: This is not correct for all versions of NetBSD/alpha.
+ We will probably need to disassemble the trampoline to figure
+ out which trampoline frame type we have. */
+ return frame->frame;
+}
+
+static CORE_ADDR
+alphanbsd_skip_sigtramp_frame (struct frame_info *frame, CORE_ADDR pc)
+{
+ char *name;
+
+ /* FIXME: This is not correct for all versions of NetBSD/alpha.
+ We will probably need to disassemble the trampoline to figure
+ out which trampoline frame type we have. */
+ find_pc_partial_function (pc, &name, (CORE_ADDR *) NULL, (CORE_ADDR *) NULL);
+ if (PC_IN_SIGTRAMP (pc, name))
+ return frame->frame;
+ return 0;
}
static void
@@ -196,7 +221,9 @@ alphanbsd_init_abi (struct gdbarch_info info,
set_solib_svr4_fetch_link_map_offsets (gdbarch,
nbsd_lp64_solib_svr4_fetch_link_map_offsets);
+ tdep->skip_sigtramp_frame = alphanbsd_skip_sigtramp_frame;
tdep->dynamic_sigtramp_offset = alphanbsd_sigtramp_offset;
+ tdep->sigcontext_addr = alphanbsd_sigcontext_addr;
tdep->jb_pc = 2;
tdep->jb_elt_size = 8;