aboutsummaryrefslogtreecommitdiff
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
commitcbafadeb88b139e212f4e453a8f93304c813b2df (patch)
tree39958aeb28a32b2b09ed71a4eabe0c968b27fc81 /gdb/sentinel-frame.c
parenta77a9021ea85cf83d077a32391e682c6320adc88 (diff)
downloadgdb-cbafadeb88b139e212f4e453a8f93304c813b2df.zip
gdb-cbafadeb88b139e212f4e453a8f93304c813b2df.tar.gz
gdb-cbafadeb88b139e212f4e453a8f93304c813b2df.tar.bz2
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 f1e5c7f..b17bc82 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;