aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tui-disasm.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-11-12 17:15:12 -0700
committerTom Tromey <tom@tromey.com>2019-12-20 09:15:51 -0700
commitd4669c0fc75ad5ad2e99748f9307b5038955f9d3 (patch)
tree9578f9233074c3b67d92d0d9dfa89d01259e0f98 /gdb/tui/tui-disasm.c
parent1ae58f0c640ccef6ae9cc9b349547bb552274b69 (diff)
downloadgdb-d4669c0fc75ad5ad2e99748f9307b5038955f9d3.zip
gdb-d4669c0fc75ad5ad2e99748f9307b5038955f9d3.tar.gz
gdb-d4669c0fc75ad5ad2e99748f9307b5038955f9d3.tar.bz2
Remove some unnecessary focus switches
A couple of lower-level utility functions can change the TUI focus. This seems incorrect to me -- focus switches should only be done either by explicit user request, or ass a side effect of changing the layout. gdb/ChangeLog 2019-12-20 Tom Tromey <tom@tromey.com> * tui/tui-winsource.c (tui_source_window_base::update_source_window_as_is): Don't switch focus. * tui/tui-disasm.c (tui_show_disassem): Don't switch focus. Change-Id: I0a5bb8a407cf8d52e2fd23b0598eb9bce56b1251
Diffstat (limited to 'gdb/tui/tui-disasm.c')
-rw-r--r--gdb/tui/tui-disasm.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/gdb/tui/tui-disasm.c b/gdb/tui/tui-disasm.c
index 63d581b..11c8b30 100644
--- a/gdb/tui/tui-disasm.c
+++ b/gdb/tui/tui-disasm.c
@@ -260,7 +260,6 @@ void
tui_show_disassem (struct gdbarch *gdbarch, CORE_ADDR start_addr)
{
struct symtab *s = find_pc_line_symtab (start_addr);
- struct tui_win_info *win_with_focus = tui_win_with_focus ();
struct tui_line_or_address val;
gdb_assert (TUI_DISASM_WIN != nullptr && TUI_DISASM_WIN->is_visible ());
@@ -268,12 +267,6 @@ tui_show_disassem (struct gdbarch *gdbarch, CORE_ADDR start_addr)
val.loa = LOA_ADDRESS;
val.u.addr = start_addr;
TUI_DISASM_WIN->update_source_window (gdbarch, s, val);
-
- /* If the focus was in the src win, put it in the asm win, if the
- source view isn't split. */
- if (tui_current_layout () != SRC_DISASSEM_COMMAND
- && win_with_focus == TUI_SRC_WIN)
- tui_set_win_focus_to (TUI_DISASM_WIN);
}
void