diff options
author | Andrew Cagney <cagney@redhat.com> | 2002-11-15 22:16:25 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2002-11-15 22:16:25 +0000 |
commit | 33e27657fbfa8d586a73764b0288d9ddac5124de (patch) | |
tree | 39f9873486a2edfe58bdef0978f41b45a40fa482 /gdb/dummy-frame.c | |
parent | 33910830712bc1c94c6fcd2c67bd9eae49616d5b (diff) | |
download | gdb-33e27657fbfa8d586a73764b0288d9ddac5124de.tar.gz |
2002-11-15 Andrew Cagney <ac131313@redhat.com>
* frame.c (frame_pc_unwind): New function.
(frame_saved_regs_pc_unwind): New function.
(frame_register_unwind): Pass unwind_cache instead of
register_unwind_cache.
(set_unwind_by_pc): Add unwind_pc parameter, set.
(create_new_frame): Pass frame->pc_unwind to set_unwind_by_pc.
(get_prev_frame): Ditto.
* frame.h (frame_pc_unwind_ftype): Declare.
(struct frame_info): Add pc_unwind, pc_unwind_cache_p and
pc_unwind_cache. Rename register_unwind_cache to unwind_cache.
(frame_pc_unwind): Declare.
* dummy-frame.c (dummy_frame_pc_unwind): New function.
(struct dummy_frame): Add comment mentioning that values are for
previous frame.
* dummy-frame.h (dummy_frame_pc_unwind): Declare.
* blockframe.c (file_frame_chain_valid): Use frame_pc_unwind.
(generic_file_frame_chain_valid): Ditto.
* stack.c (frame_info): Ditto.
Diffstat (limited to 'gdb/dummy-frame.c')
-rw-r--r-- | gdb/dummy-frame.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gdb/dummy-frame.c b/gdb/dummy-frame.c index ddc4db8f4b3..06dacbbeed1 100644 --- a/gdb/dummy-frame.c +++ b/gdb/dummy-frame.c @@ -37,6 +37,8 @@ struct dummy_frame { struct dummy_frame *next; + /* These values belong to the caller (the previous frame, the frame + that this unwinds back to). */ CORE_ADDR pc; CORE_ADDR fp; CORE_ADDR sp; @@ -308,3 +310,16 @@ dummy_frame_register_unwind (struct frame_info *frame, void **cache, } } +CORE_ADDR +dummy_frame_pc_unwind (struct frame_info *frame, + void **cache) +{ + struct dummy_frame *dummy = cached_find_dummy_frame (frame, cache); + /* Oops! In a dummy-frame but can't find the stack dummy. Pretend + that the frame doesn't unwind. Should this function instead + return a has-no-caller indication? */ + if (dummy == NULL) + return 0; + return dummy->pc; +} + |