summaryrefslogtreecommitdiff
path: root/gdb/sentinel-frame.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-11-09 01:16:42 +0000
committerAndrew Cagney <cagney@redhat.com>2004-11-09 01:16:42 +0000
commit3c658c099f944735fd5d75524c1c65c69252beb5 (patch)
treeb2530bbe73bd2b93eeb9d03647300a4adf058d98 /gdb/sentinel-frame.c
parent5390c114d6028ec3469a54c68e873d44b70f9c17 (diff)
downloadgdb-3c658c099f944735fd5d75524c1c65c69252beb5.tar.gz
2004-11-08 Andrew Cagney <cagney@gnu.org>
* sentinel-frame.c (sentinel_frame_prev_pc): New function. (sentinel_frame_unwinder): Add the prev_pc method. * frame.c (frame_pc_unwind): Use the per-frame pc unwinder when available. Do not handle the sentinel-frame case. * frame-unwind.h (frame_prev_register_ftype): Define. (struct frame_unwind): Add prev_pc;
Diffstat (limited to 'gdb/sentinel-frame.c')
-rw-r--r--gdb/sentinel-frame.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/gdb/sentinel-frame.c b/gdb/sentinel-frame.c
index f1e5c7fcc2c..b17bc82850f 100644
--- a/gdb/sentinel-frame.c
+++ b/gdb/sentinel-frame.c
@@ -81,11 +81,22 @@ sentinel_frame_this_id (struct frame_info *next_frame,
internal_error (__FILE__, __LINE__, "sentinel_frame_this_id called");
}
+static CORE_ADDR
+sentinel_frame_prev_pc (struct frame_info *next_frame,
+ void **this_prologue_cache)
+{
+ struct gdbarch *gdbarch = get_frame_arch (next_frame);
+ return gdbarch_unwind_pc (gdbarch, next_frame);
+}
+
const struct frame_unwind sentinel_frame_unwinder =
{
SENTINEL_FRAME,
sentinel_frame_this_id,
- sentinel_frame_prev_register
+ sentinel_frame_prev_register,
+ NULL, /* unwind_data */
+ NULL, /* sniffer */
+ sentinel_frame_prev_pc,
};
const struct frame_unwind *const sentinel_frame_unwind = &sentinel_frame_unwinder;