aboutsummaryrefslogtreecommitdiff
path: root/gdb/frame-unwind.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/frame-unwind.c')
-rw-r--r--gdb/frame-unwind.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gdb/frame-unwind.c b/gdb/frame-unwind.c
index e6e6353..fb0e5e8 100644
--- a/gdb/frame-unwind.c
+++ b/gdb/frame-unwind.c
@@ -193,6 +193,26 @@ default_frame_unwind_stop_reason (struct frame_info *this_frame,
return UNWIND_NO_REASON;
}
+/* See frame-unwind.h. */
+
+CORE_ADDR
+default_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
+{
+ int pc_regnum = gdbarch_pc_regnum (gdbarch);
+ CORE_ADDR pc = frame_unwind_register_unsigned (next_frame, pc_regnum);
+ pc = gdbarch_addr_bits_remove (gdbarch, pc);
+ return pc;
+}
+
+/* See frame-unwind.h. */
+
+CORE_ADDR
+default_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
+{
+ int sp_regnum = gdbarch_sp_regnum (gdbarch);
+ return frame_unwind_register_unsigned (next_frame, sp_regnum);
+}
+
/* Helper functions for value-based register unwinding. These return
a (possibly lazy) value of the appropriate type. */