summaryrefslogtreecommitdiff
path: root/gdb/d10v-tdep.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-03-05 23:14:18 +0000
committerAndrew Cagney <cagney@redhat.com>2003-03-05 23:14:18 +0000
commitdf4df349cdb9934fbbe9d7028c2ab89e5b20373a (patch)
tree6f9ee79846277c0f12b43ab46800c81da7028dbf /gdb/d10v-tdep.c
parent0ed78011a61e6a131e1ed1118faa7fe50d9178fc (diff)
downloadgdb-df4df349cdb9934fbbe9d7028c2ab89e5b20373a.tar.gz
2003-03-05 Andrew Cagney <cagney@redhat.com>
* d10v-tdep.c (d10v_unwind_dummy_id): New function. (d10v_gdbarch_init): Set unwind_dummy_id and save_dummy_frame_tos. * frame.c (get_prev_frame): Restructure the frame ID unwind code to use unwind_dummy_id when a dummy frame. * gdbarch.sh (unwind_dummy_id): New multi-arch method with predicate. * gdbarch.h, gdbarch.c: Regneerate. Index: doc/ChangeLog 2003-03-05 Andrew Cagney <cagney@redhat.com> * gdbint.texinfo (Target Architecture Definition): Document unwind_dummy_id. Cross reference unwind_dummy_id and SAVE_DUMMY_FRAME_TOS.
Diffstat (limited to 'gdb/d10v-tdep.c')
-rw-r--r--gdb/d10v-tdep.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c
index fc05e806edc..5f334e6a7ab 100644
--- a/gdb/d10v-tdep.c
+++ b/gdb/d10v-tdep.c
@@ -1612,6 +1612,22 @@ d10v_frame_p (CORE_ADDR pc)
return &d10v_frame_unwind;
}
+/* Assuming NEXT_FRAME->prev is a dummy, return the frame ID of that
+ dummy frame. The frame ID's base needs to match the TOS value
+ saved by save_dummy_frame_tos(), and the PC match the dummy frame's
+ breakpoint. */
+
+static struct frame_id
+d10v_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *next_frame)
+{
+ ULONGEST base;
+ struct frame_id id;
+ id.pc = frame_pc_unwind (next_frame);
+ frame_unwind_unsigned_register (next_frame, SP_REGNUM, &base);
+ id.base = d10v_make_daddr (base);
+ return id;
+}
+
static gdbarch_init_ftype d10v_gdbarch_init;
static struct gdbarch *
@@ -1749,6 +1765,10 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
frame_unwind_append_predicate (gdbarch, d10v_frame_p);
+ /* Methods for saving / extracting a dummy frame's ID. */
+ set_gdbarch_unwind_dummy_id (gdbarch, d10v_unwind_dummy_id);
+ set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
+
return gdbarch;
}