aboutsummaryrefslogtreecommitdiff
path: root/gdb/d10v-tdep.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-03-10 15:28:41 +0000
committerAndrew Cagney <cagney@redhat.com>2003-03-10 15:28:41 +0000
commit12cc2063bed3b79f2a3e92342e92dc6211a3bf12 (patch)
treec65dc866e40ffdd0796020c984da78caaa0d9565 /gdb/d10v-tdep.c
parenta2ce2e563724c710bcaeaa361ec61446a599060b (diff)
downloadgdb-12cc2063bed3b79f2a3e92342e92dc6211a3bf12.zip
gdb-12cc2063bed3b79f2a3e92342e92dc6211a3bf12.tar.gz
gdb-12cc2063bed3b79f2a3e92342e92dc6211a3bf12.tar.bz2
2003-03-10 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (gdbarch_unwind_pc): New method. * gdbarch.h, gdbarch.c: Regenerate. * frame.c (frame_pc_unwind): Rewrite. Prefer gdbarch_unwind_pc, but use read_pc and FRAME_SAVED_PC as fall backs. (frame_saved_regs_pc_unwind): Delete function. (trad_frame_unwinder): Update. * frame-unwind.h (frame_unwind_pc_ftype): Delete declaration. (struct frame_unwind): Update. * dummy-frame.c (dummy_frame_pc_unwind): Delete function. (dummy_frame_unwind): Update. * sentinel-frame.c (sentinel_frame_pc_unwind): Delete function. (sentinel_frame_unwinder): Update. * d10v-tdep.c (d10v_frame_pc_unwind): Delete function. (d10v_frame_unwind): Update. (d10v_unwind_pc): New function. (d10v_gdbarch_init): Set unwind_pc. Index: doc/ChangeLog 2003-03-10 Andrew Cagney <cagney@redhat.com> * gdbint.texinfo (Target Architecture Definition): Cross reference FRAME_SAVED_PC to unwind_pc. Document unwind_pc.
Diffstat (limited to 'gdb/d10v-tdep.c')
-rw-r--r--gdb/d10v-tdep.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c
index b50cfa7..516cde4 100644
--- a/gdb/d10v-tdep.c
+++ b/gdb/d10v-tdep.c
@@ -1445,13 +1445,12 @@ display_trace (int low, int high)
}
}
-
static CORE_ADDR
-d10v_frame_pc_unwind (struct frame_info *frame,
- void **cache)
+d10v_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
- struct d10v_unwind_cache *info = d10v_frame_unwind_cache (frame, cache);
- return info->return_pc;
+ ULONGEST pc;
+ frame_unwind_unsigned_register (next_frame, PC_REGNUM, &pc);
+ return d10v_make_iaddr (pc);
}
/* Given a GDB frame, determine the address of the calling function's
@@ -1612,7 +1611,6 @@ d10v_frame_pop (struct frame_info *fi, void **unwind_cache,
static struct frame_unwind d10v_frame_unwind = {
d10v_frame_pop,
- d10v_frame_pc_unwind,
d10v_frame_id_unwind,
d10v_frame_register_unwind
};
@@ -1780,6 +1778,9 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_unwind_dummy_id (gdbarch, d10v_unwind_dummy_id);
set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
+ /* Return the unwound PC value. */
+ set_gdbarch_unwind_pc (gdbarch, d10v_unwind_pc);
+
return gdbarch;
}