diff options
author | Daniel Jacobowitz <drow@false.org> | 2007-02-27 19:46:04 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2007-02-27 19:46:04 +0000 |
commit | 206415a3eac4f69d24cf872f880f554d3d43f1bb (patch) | |
tree | ad72202befac2e3d20e6769060ab6c0c6384d824 /gdb/stack.c | |
parent | e1c9b6f16a257b4ffff961d59fc9204847eca1f4 (diff) | |
download | gdb-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/stack.c')
-rw-r--r-- | gdb/stack.c | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/gdb/stack.c b/gdb/stack.c index 5126911..0267d0b 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -1592,24 +1592,7 @@ get_selected_block (CORE_ADDR *addr_in_block) if (!target_has_stack) return 0; - /* NOTE: cagney/2002-11-28: Why go to all this effort to not create - a selected/current frame? Perhaps this function is called, - indirectly, by WFI in "infrun.c" where avoiding the creation of - an inner most frame is very important (it slows down single - step). I suspect, though that this was true in the deep dark - past but is no longer the case. A mindless look at all the - callers tends to support this theory. I think we should be able - to assume that there is always a selcted frame. */ - /* gdb_assert (deprecated_selected_frame != NULL); So, do you feel - lucky? */ - if (!deprecated_selected_frame) - { - CORE_ADDR pc = read_pc (); - if (addr_in_block != NULL) - *addr_in_block = pc; - return block_for_pc (pc); - } - return get_frame_block (deprecated_selected_frame, addr_in_block); + return get_frame_block (get_selected_frame (NULL), addr_in_block); } /* Find a frame a certain number of levels away from FRAME. @@ -1933,7 +1916,7 @@ func_command (char *arg, int from_tty) if (!found) printf_filtered (_("'%s' not within current stack frame.\n"), arg); - else if (frame != deprecated_selected_frame) + else if (frame != get_selected_frame (NULL)) select_and_print_frame (frame); } @@ -1942,7 +1925,7 @@ func_command (char *arg, int from_tty) enum language get_frame_language (void) { - struct frame_info *frame = deprecated_selected_frame; + struct frame_info *frame = deprecated_safe_get_selected_frame (); if (frame) { |