summaryrefslogtreecommitdiff
path: root/gdb/frame.h
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-06-10 23:25:50 +0000
committerAndrew Cagney <cagney@redhat.com>2002-06-10 23:25:50 +0000
commitf0be4becd3a90798750f5f719b9a194180a98f07 (patch)
tree2ab09aa72e20c68a601b53159c3358392255bf9f /gdb/frame.h
parenta04038db9f8be340b5b8709a1627efbb0b005f27 (diff)
downloadgdb-f0be4becd3a90798750f5f719b9a194180a98f07.tar.gz
* infrun.c (struct inferior_status): Replace fields
selected_frame_address and selected_level with field selected_frame_id. (save_inferior_status): Update. Use get_frame_id. (struct restore_selected_frame_args): Delete. (restore_selected_frame): Update. Use frame_find_by_id. (restore_inferior_status): Update. * breakpoint.h (struct breakpoint): Change type of watchpoint_frame to frame_id. * breakpoint.c (insert_breakpoints): Use frame_find_by_id. Remove call to get_current_frame. (do_enable_breakpoint): Use frame_find_by_id. Remove call to get_current_frame. (watchpoint_check): Use frame_find_by_id. * frame.h (record_selected_frame): Delete declaration. * stack.c (record_selected_frame): Delete function. * frame.h (struct frame_id): Define. (get_frame_id): Declare. (frame_find_by_id): Declare. * frame.c (frame_find_by_id): New function. (get_frame_id): New function.
Diffstat (limited to 'gdb/frame.h')
-rw-r--r--gdb/frame.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/gdb/frame.h b/gdb/frame.h
index cdbcd481764..c1df5fcdda6 100644
--- a/gdb/frame.h
+++ b/gdb/frame.h
@@ -274,7 +274,21 @@ extern void show_stack_frame (struct frame_info *);
extern void select_frame (struct frame_info *);
-extern void record_selected_frame (CORE_ADDR *, int *);
+/* Return an ID that can be used to re-find a frame. */
+
+struct frame_id
+{
+ /* The frame's address. This should be constant through out the
+ lifetime of a frame. */
+ CORE_ADDR base;
+ /* The frame's current PC. While this changes, the function that
+ the PC falls into, does not. */
+ CORE_ADDR pc;
+};
+
+extern void get_frame_id (struct frame_info *fi, struct frame_id *id);
+
+extern struct frame_info *frame_find_by_id (struct frame_id id);
extern void print_frame_info (struct frame_info *, int, int, int);