diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-03-05 23:14:18 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-03-05 23:14:18 +0000 |
commit | 6314f104748d0e970aa089d2ba544f81a491b565 (patch) | |
tree | cd0ccc6aba2d308e24939cc29c045ff0b10944a8 /gdb/d10v-tdep.c | |
parent | 77bc0b710e2c41acdf462c9f8608eb747549257c (diff) | |
download | gdb-6314f104748d0e970aa089d2ba544f81a491b565.zip gdb-6314f104748d0e970aa089d2ba544f81a491b565.tar.gz gdb-6314f104748d0e970aa089d2ba544f81a491b565.tar.bz2 |
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.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c index fc05e80..5f334e6 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; } |