From c689142becccac9fa3b1f9833243048a50396ffe Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Fri, 13 Dec 2002 16:40:25 +0000 Subject: 2002-12-13 Andrew Cagney * frame.h (frame_id_unwind): Declare. (struct frame_info): Add fields id_unwind, id_unwind_cache_p and id_unwind_cache. (frame_id_unwind_ftype): Declare. * frame.c (frame_id_unwind): New function. (set_unwind_by_pc): Add unwind_id parameter. Initialized. (create_new_frame, get_prev_frame): Pass id_unwind to set_unwind_by_pc. (frame_saved_regs_id_unwind): New function. (frame_saved_regs_id_unwind): New function. * dummy-frame.c (dummy_frame_id_unwind): New function. (struct dummy_frame): Add field id. (generic_push_dummy_frame): Initialize `id'. * dummy-frame.h (dummy_frame_id_unwind): Declare. --- gdb/frame.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'gdb/frame.h') diff --git a/gdb/frame.h b/gdb/frame.h index 5a45502..0fd305e 100644 --- a/gdb/frame.h +++ b/gdb/frame.h @@ -298,6 +298,10 @@ extern const char *frame_map_regnum_to_name (int regnum); extern CORE_ADDR frame_pc_unwind (struct frame_info *frame); +/* Unwind the frame ID. Return an ID that uniquely identifies the + caller's frame. */ +extern struct frame_id frame_id_unwind (struct frame_info *frame); + /* Return the location (and possibly value) of REGNUM for the previous (older, up) frame. All parameters except VALUEP can be assumed to @@ -328,6 +332,12 @@ typedef void (frame_register_unwind_ftype) (struct frame_info *frame, typedef CORE_ADDR (frame_pc_unwind_ftype) (struct frame_info *frame, void **unwind_cache); +/* Same as for registers above, but return the ID of the frame that + called this one. */ + +typedef struct frame_info (frame_id_unwind_ftype) (struct frame_info *frame, + void **unwind_cache); + /* Describe the saved registers of a frame. */ #if defined (EXTRA_FRAME_INFO) || defined (FRAME_FIND_SAVED_REGS) @@ -424,6 +434,12 @@ struct frame_info int pc_unwind_cache_p; CORE_ADDR pc_unwind_cache; + /* See description above. The previous frame's resume address. + Save the previous PC in a local cache. */ + frame_id_unwind_ftype *id_unwind; + int id_unwind_cache_p; + struct frame_id id_unwind_cache; + /* Pointers to the next (down, inner, younger) and previous (up, outer, older) frame_info's in the frame cache. */ struct frame_info *next; /* down, inner, younger */ -- cgit v1.1