diff options
Diffstat (limited to 'gdb/tui')
-rw-r--r-- | gdb/tui/tui-layout.c | 7 | ||||
-rw-r--r-- | gdb/tui/tui-layout.h | 3 | ||||
-rw-r--r-- | gdb/tui/tui.c | 38 |
3 files changed, 12 insertions, 36 deletions
diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c index ce1f6a7..6a998e8 100644 --- a/gdb/tui/tui-layout.c +++ b/gdb/tui/tui-layout.c @@ -278,6 +278,13 @@ tui_layout_command (const char *layout_name, int from_tty) tui_set_layout (new_layout); } +/* See tui-layout.h. */ + +void +tui_next_layout () +{ + tui_layout_command ("next", 0); +} static void extract_display_start_addr (struct gdbarch **gdbarch_p, CORE_ADDR *addr_p) diff --git a/gdb/tui/tui-layout.h b/gdb/tui/tui-layout.h index 37f07c2..7e4b7b7 100644 --- a/gdb/tui/tui-layout.h +++ b/gdb/tui/tui-layout.h @@ -181,6 +181,9 @@ extern void tui_add_win_to_layout (enum tui_win_type); extern void tui_set_layout (enum tui_layout_type); +/* Switch to the next layout. */ +extern void tui_next_layout (); + /* Apply the current layout. */ extern void tui_apply_current_layout (); diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c index 0a59837..74bf32d 100644 --- a/gdb/tui/tui.c +++ b/gdb/tui/tui.c @@ -140,8 +140,7 @@ tui_rl_switch_mode (int notused1, int notused2) /* TUI readline command. Change the TUI layout to show a next layout. This function is bound to CTRL-X 2. It is intended to provide - a functionality close to the Emacs split-window command. We - always show two windows (src+asm), (src+regs) or (asm+regs). */ + a functionality close to the Emacs split-window command. */ static int tui_rl_change_windows (int notused1, int notused2) { @@ -149,41 +148,8 @@ tui_rl_change_windows (int notused1, int notused2) tui_rl_switch_mode (0 /* notused */, 0 /* notused */); if (tui_active) - { - enum tui_layout_type new_layout; - - new_layout = tui_current_layout (); - - /* Select a new layout to have a rolling layout behavior with - always two windows (except when undefined). */ - switch (new_layout) - { - case SRC_COMMAND: - new_layout = SRC_DISASSEM_COMMAND; - break; - - case DISASSEM_COMMAND: - new_layout = SRC_DISASSEM_COMMAND; - break; - - case SRC_DATA_COMMAND: - new_layout = SRC_DISASSEM_COMMAND; - break; - - case SRC_DISASSEM_COMMAND: - new_layout = DISASSEM_DATA_COMMAND; - break; - - case DISASSEM_DATA_COMMAND: - new_layout = SRC_DATA_COMMAND; - break; + tui_next_layout (); - default: - new_layout = SRC_COMMAND; - break; - } - tui_set_layout (new_layout); - } return 0; } |