diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2015-05-22 10:07:42 +0200 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2015-05-22 12:18:49 +0200 |
commit | a4ea0946c3f1badd6755b85b4e50e2ec4841e69c (patch) | |
tree | 676764992447da0e911ecb1e803bf7b9e26404fc /gdb/tui | |
parent | 158bf1b4aacf7f184facdc184dc9585994f041a6 (diff) | |
download | gdb-a4ea0946c3f1badd6755b85b4e50e2ec4841e69c.zip gdb-a4ea0946c3f1badd6755b85b4e50e2ec4841e69c.tar.gz gdb-a4ea0946c3f1badd6755b85b4e50e2ec4841e69c.tar.bz2 |
gdb: New 'tui enable' and 'tui disable' commands.
Add new commands to specifically enable and disable tui mode. This is
in addition to the readline bindings, but might be easier for a user to
discover if they accidentally end up in tui mode.
gdb/ChangeLog:
* NEWS: Mention 'tui enable' and 'tui disable'.
* tui/tui.c (tui_enable_command): New function.
(tui_disable_command): New function.
(_initialize_tui): New function.
gdb/doc/ChangeLog:
* gdb.texinfo (TUI): Include 'tui enable' in the introduction.
(TUI Commands): Add 'tui enable' and 'tui disable' details.
Diffstat (limited to 'gdb/tui')
-rw-r--r-- | gdb/tui/tui.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c index 308e7ae..838471d 100644 --- a/gdb/tui/tui.c +++ b/gdb/tui/tui.c @@ -540,6 +540,22 @@ tui_disable (void) tui_update_gdb_sizes (); } +/* Command wrapper for enabling tui mode. */ + +static void +tui_enable_command (char *args, int from_tty) +{ + tui_enable (); +} + +/* Command wrapper for leaving tui mode. */ + +static void +tui_disable_command (char *args, int from_tty) +{ + tui_disable (); +} + void strcat_to_buf (char *buf, int buflen, const char *item_to_add) @@ -652,3 +668,21 @@ tui_get_command_dimension (unsigned int *width, *height = TUI_CMD_WIN->generic.height; return 1; } + +/* Provide a prototype to silence -Wmissing-prototypes. */ +extern initialize_file_ftype _initialize_tui; + +void +_initialize_tui (void) +{ + struct cmd_list_element **tuicmd; + + tuicmd = tui_get_cmd_list (); + + add_cmd ("enable", class_tui, tui_enable_command, + _("Enable TUI display mode."), + tuicmd); + add_cmd ("disable", class_tui, tui_disable_command, + _("Disable TUI display mode."), + tuicmd); +} |