summaryrefslogtreecommitdiff
path: root/gdb/frame-unwind.h
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2009-07-02 17:09:25 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2009-07-02 17:09:25 +0000
commit4f07da5fa7fe075ba28da60a5f3290c46ee8340f (patch)
tree58923b2f672aef3294a01a84b233beeceff6e4b8 /gdb/frame-unwind.h
parent0457fb422b968a6ce1d2e0d19371a1dce27d70a9 (diff)
downloadgdb-4f07da5fa7fe075ba28da60a5f3290c46ee8340f.tar.gz
* frame.h (frame_unwind_arch): New.
(frame_unwind_caller_arch): Likewise. * frame-unwind.h (frame_prev_arch_ftype): New type. (struct frame_unwind): New member prev_arch. * frame.c (struct frame_info): New member prev_arch. (frame_unwind_arch): New function. (frame_unwind_caller_arch): Likewise.. (get_frame_arch): Reimplement in terms of frame_unwind_arch. * sentinel-frame.c (sentinel_frame_prev_arch): New function. (sentinel_frame_unwinder): Install it. * frame.c (frame_pc_unwind): Use frame_unwind_arch instead of get_frame_arch. (frame_unwind_register_value): Likewise. (frame_unwind_register_signed): Likewise. (frame_unwind_register_unsigned): Likewise. * frame-unwind.c (frame_unwind_got_optimized): Likewise. (frame_unwind_got_register): Likewise. (frame_unwind_got_constant): Likewise. (frame_unwind_got_bytes): Likewise. (frame_unwind_got_address): Likewise. * frame.h (enum frame_type): New value ARCH_FRAME. * frame.c (fprint_frame_type): Handle ARCH_FRAME. * stack.c (print_frame_info): Likewise.
Diffstat (limited to 'gdb/frame-unwind.h')
-rw-r--r--gdb/frame-unwind.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/frame-unwind.h b/gdb/frame-unwind.h
index 35eeebf56cc..c4518b558e1 100644
--- a/gdb/frame-unwind.h
+++ b/gdb/frame-unwind.h
@@ -121,6 +121,13 @@ typedef struct value * (frame_prev_register_ftype)
typedef void (frame_dealloc_cache_ftype) (struct frame_info *self,
void *this_cache);
+/* Assuming the frame chain: (outer) prev <-> this <-> next (inner);
+ use THIS frame, and implicitly the NEXT frame's register unwind
+ method, return PREV frame's architecture. */
+
+typedef struct gdbarch *(frame_prev_arch_ftype) (struct frame_info *this_frame,
+ void **this_prologue_cache);
+
struct frame_unwind
{
/* The frame's type. Should this instead be a collection of
@@ -133,6 +140,7 @@ struct frame_unwind
const struct frame_data *unwind_data;
frame_sniffer_ftype *sniffer;
frame_dealloc_cache_ftype *dealloc_cache;
+ frame_prev_arch_ftype *prev_arch;
};
/* Register a frame unwinder, _prepending_ it to the front of the