diff options
author | Andrew Cagney <cagney@redhat.com> | 2002-12-13 16:40:25 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2002-12-13 16:40:25 +0000 |
commit | 99123a005aedd0f165d32fad2d9e7a50a236c609 (patch) | |
tree | c82801fa0113cf6c85bc6024b7df8c03c4932b4f /gdb/frame.h | |
parent | 27c3ee81da9bb38e615baef62ffd5d25e7eefca3 (diff) | |
download | gdb-99123a005aedd0f165d32fad2d9e7a50a236c609.tar.gz |
2002-12-13 Andrew Cagney <ac131313@redhat.com>
* 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.
Diffstat (limited to 'gdb/frame.h')
-rw-r--r-- | gdb/frame.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/frame.h b/gdb/frame.h index 5a45502982a..0fd305e2357 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 */ |