diff options
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.tui/list.exp | 3 | ||||
-rw-r--r-- | gdb/tui/tui-layout.c | 12 |
4 files changed, 18 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 735333f..c24dcca 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2020-01-05 Andrew Burgess <andrew.burgess@embecosm.com> + + * tui/tui-layout.c (tui_add_win_to_layout): Use tui_set_layout not + show_layout. + 2020-01-05 Luis Machado <luis.machado@linaro.org> * aarch64-linux-nat.c diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 78f9700..ba857a4 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2020-01-05 Andrew Burgess <andrew.burgess@embecosm.com> + + * gdb.tui/list.exp: Test 'focus next' after 'list main'. + 2020-01-03 Philippe Waroquiers <philippe.waroquiers@skynet.be> * gdb.base/style.exp: Test that warnings are styled. diff --git a/gdb/testsuite/gdb.tui/list.exp b/gdb/testsuite/gdb.tui/list.exp index a4a9fda..41cec12 100644 --- a/gdb/testsuite/gdb.tui/list.exp +++ b/gdb/testsuite/gdb.tui/list.exp @@ -35,3 +35,6 @@ Term::check_contents "asm window shows main" "$hex <main>" Term::command "list main" Term::check_contents "list main" "21 *return 0" +# The following 'focus next' must be immediately after 'list main' to +# ensure that GDB has a valid idea of what is currently focused. +Term::command "focus next" diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c index 1e9c5c5..3720d3e 100644 --- a/gdb/tui/tui-layout.c +++ b/gdb/tui/tui-layout.c @@ -201,9 +201,9 @@ tui_add_win_to_layout (enum tui_win_type type) && cur_layout != SRC_DATA_COMMAND) { if (cur_layout == DISASSEM_DATA_COMMAND) - show_layout (SRC_DATA_COMMAND); + tui_set_layout (SRC_DATA_COMMAND); else - show_layout (SRC_COMMAND); + tui_set_layout (SRC_COMMAND); } break; case DISASSEM_WIN: @@ -212,9 +212,9 @@ tui_add_win_to_layout (enum tui_win_type type) && cur_layout != DISASSEM_DATA_COMMAND) { if (cur_layout == SRC_DATA_COMMAND) - show_layout (DISASSEM_DATA_COMMAND); + tui_set_layout (DISASSEM_DATA_COMMAND); else - show_layout (DISASSEM_COMMAND); + tui_set_layout (DISASSEM_COMMAND); } break; case DATA_WIN: @@ -222,9 +222,9 @@ tui_add_win_to_layout (enum tui_win_type type) && cur_layout != DISASSEM_DATA_COMMAND) { if (cur_layout == DISASSEM_COMMAND) - show_layout (DISASSEM_DATA_COMMAND); + tui_set_layout (DISASSEM_DATA_COMMAND); else - show_layout (SRC_DATA_COMMAND); + tui_set_layout (SRC_DATA_COMMAND); } break; default: |