aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tui-data.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2020-02-22 11:48:26 -0700
committerTom Tromey <tom@tromey.com>2020-02-22 11:48:30 -0700
commit416eb92d84ac0bc4b8aba137789f52d1f987cd54 (patch)
treed340076992433388780995dd406fbcc065346151 /gdb/tui/tui-data.h
parent0dbc2fc759fc8b5eaa69d7b3b7d0c4cf4afb19be (diff)
downloadgdb-416eb92d84ac0bc4b8aba137789f52d1f987cd54.zip
gdb-416eb92d84ac0bc4b8aba137789f52d1f987cd54.tar.gz
gdb-416eb92d84ac0bc4b8aba137789f52d1f987cd54.tar.bz2
Remove hard-coded TUI layouts
This changes the TUI so that the available layouts are no longer completely hard-coded. "enum tui_layout_type" is removed, and then all the fallout from this is fixed up. This patch also reimplements the "layout" command to be a prefix command. The concrete layouts are simply sub-commands now. This provides completion and correct abbreviation behavior for free. Finally, this also changes the name of the locator window to "status". This matches the documentation and will be exposed to the user in a subsequent patch. gdb/ChangeLog 2020-02-22 Tom Tromey <tom@tromey.com> * tui/tui.c (tui_enable): Call tui_set_initial_layout. * tui/tui-win.c (window_name_completer): Update comment. * tui/tui-layout.h (class tui_layout_base) <replace_window>: Declare method. (class tui_layout_window) <replace_window>: Likewise. (class tui_layout_split) <replace_window>: Likewise. (tui_set_layout): Don't declare. (tui_set_initial_layout): Declare function. * tui/tui-layout.c (layouts, applied_skeleton, src_regs_layout) (asm_regs_layout): New globals. (tui_current_layout, show_layout): Remove. (tui_set_layout, tui_add_win_to_layout): Rewrite. (find_layout, tui_apply_layout): New function. (layout_completer): Remove. (tui_next_layout): Reimplement. (tui_next_layout_command): New function. (tui_set_initial_layout, tui_prev_layout_command): New functions. (tui_regs_layout): Reimplement. (tui_regs_layout_command): New function. (extract_display_start_addr): Rewrite. (next_layout, prev_layout): Remove. (tui_layout_window::replace_window): New method. (tui_layout_split::replace_window): New method. (destroy_layout): New function. (layout_list): New global. (add_layout_command): New function. (initialize_layouts): Update. (tui_layout_command): New function. (_initialize_tui_layout): Install "layout" commands. * tui/tui-data.h (enum tui_layout_type): Remove. (tui_current_layout): Don't declare. Change-Id: I9b5f7ab3ce838d6b340b8c373ef649a8e0a74b73
Diffstat (limited to 'gdb/tui/tui-data.h')
-rw-r--r--gdb/tui/tui-data.h12
1 files changed, 0 insertions, 12 deletions
diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h
index 6f86122..2badcd4 100644
--- a/gdb/tui/tui-data.h
+++ b/gdb/tui/tui-data.h
@@ -131,17 +131,6 @@ public:
/* Strings to display in the TUI status line. */
#define SINGLE_KEY "(SingleKey)"
-/* The kinds of layouts available. */
-enum tui_layout_type
-{
- SRC_COMMAND,
- DISASSEM_COMMAND,
- SRC_DISASSEM_COMMAND,
- SRC_DATA_COMMAND,
- DISASSEM_DATA_COMMAND,
- UNDEFINED_LAYOUT
-};
-
enum tui_line_or_address_kind
{
LOA_LINE,
@@ -310,7 +299,6 @@ struct all_tui_windows
/* Data Manipulation Functions. */
-extern enum tui_layout_type tui_current_layout (void);
extern int tui_term_height (void);
extern void tui_set_term_height_to (int);
extern int tui_term_width (void);