aboutsummaryrefslogtreecommitdiff
path: root/gdb/frame.h
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2007-02-27 19:46:04 +0000
committerDaniel Jacobowitz <drow@false.org>2007-02-27 19:46:04 +0000
commit206415a3eac4f69d24cf872f880f554d3d43f1bb (patch)
treead72202befac2e3d20e6769060ab6c0c6384d824 /gdb/frame.h
parente1c9b6f16a257b4ffff961d59fc9204847eca1f4 (diff)
downloadgdb-206415a3eac4f69d24cf872f880f554d3d43f1bb.zip
gdb-206415a3eac4f69d24cf872f880f554d3d43f1bb.tar.gz
gdb-206415a3eac4f69d24cf872f880f554d3d43f1bb.tar.bz2
* frame.c (deprecated_selected_frame): Rename to...
(selected_frame): ...this. Make static. (get_selected_frame, select_frame): Update. * frame.h (deprected_select_frame): Delete. (deprecated_safe_get_selected_frame): Update comments. * breakpoint.c, cli/cli-cmds.c, f-valprint.c, infcmd.c, inflow.c, infrun.c, stack.c, tui/tui-disasm.c, tui/tui-source.c, tui/tui-winsource.c, valops.c, varobj.c, findvar.c, macroscope.c, parse.c, regcache.h, sh64-tdep.c, tui/tui-hooks.c, tui/tui-win.c, tui/tui.c: Replace references to deprecated_selected_frame.
Diffstat (limited to 'gdb/frame.h')
-rw-r--r--gdb/frame.h28
1 files changed, 10 insertions, 18 deletions
diff --git a/gdb/frame.h b/gdb/frame.h
index 4739622..bce43ed 100644
--- a/gdb/frame.h
+++ b/gdb/frame.h
@@ -665,10 +665,10 @@ extern void (*deprecated_selected_frame_level_changed_hook) (int);
extern void return_command (char *, int);
-/* NOTE: cagney/2002-11-27:
+/* Notes (cagney/2002-11-27, drow/2003-09-06):
- You might think that the below global can simply be replaced by a
- call to either get_selected_frame() or select_frame().
+ You might think that calls to this function can simply be replaced by a
+ call to get_selected_frame().
Unfortunately, it isn't that easy.
@@ -680,25 +680,17 @@ extern void return_command (char *, int);
The only real exceptions occur at the edge (in the CLI code) where
user commands need to pick up the selected frame before proceeding.
+ There are also some functions called with a NULL frame meaning either "the
+ program is not running" or "use the selected frame".
+
This is important. GDB is trying to stamp out the hack:
- saved_frame = deprecated_selected_frame;
- deprecated_selected_frame = ...;
+ saved_frame = deprecated_safe_get_selected_frame ();
+ select_frame (...);
hack_using_global_selected_frame ();
- deprecated_selected_frame = saved_frame;
-
- Take care! */
-
-extern struct frame_info *deprecated_selected_frame;
-
-/* NOTE: drow/2003-09-06:
+ select_frame (saved_frame);
- This function is "a step sideways" for uses of deprecated_selected_frame.
- They should be fixed as above, but meanwhile, we needed a solution for
- cases where functions are called with a NULL frame meaning either "the
- program is not running" or "use the selected frame". Lazy building of
- deprecated_selected_frame confuses the situation, because now
- deprecated_selected_frame can be NULL even when the inferior is running.
+ Take care!
This function calls get_selected_frame if the inferior should have a
frame, or returns NULL otherwise. */