From 36f15f554fcea7aedfdcdabcdd19e927b623d615 Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Thu, 2 Jul 2009 17:09:28 +0000 Subject: * 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. --- gdb/frame.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'gdb/frame.h') diff --git a/gdb/frame.h b/gdb/frame.h index 261c329..febef5c 100644 --- a/gdb/frame.h +++ b/gdb/frame.h @@ -203,6 +203,8 @@ enum frame_type /* In a signal handler, various OSs handle this in various ways. The main thing is that the frame may be far from normal. */ SIGTRAMP_FRAME, + /* Fake frame representing a cross-architecture call. */ + ARCH_FRAME, /* Sentinel or registers frame. This frame obtains register values direct from the inferior's registers. */ SENTINEL_FRAME @@ -545,9 +547,14 @@ extern int safe_frame_unwind_memory (struct frame_info *this_frame, CORE_ADDR addr, gdb_byte *buf, int len); /* Return this frame's architecture. */ - extern struct gdbarch *get_frame_arch (struct frame_info *this_frame); +/* Return the previous frame's architecture. */ +extern struct gdbarch *frame_unwind_arch (struct frame_info *frame); + +/* Return the previous frame's architecture, skipping inline functions. */ +extern struct gdbarch *frame_unwind_caller_arch (struct frame_info *frame); + /* Values for the source flag to be used in print_frame_info_base(). */ enum print_what -- cgit v1.1