@@ -1,5 +1,13 @@
2015-05-21 Andrew Burgess <andrew.burgess@embecosm.com>
+ * tui/tui-layout.c (_initialize_tui_layout): Add 'cli'
+ description.
+ (tui_set_layout_by_name): Check for 'cli' choice.
+ (layout_completer): Add 'cli' choice.
+ * NEWS (New commands): Mention new 'layout cli' command.
+
+2015-05-21 Andrew Burgess <andrew.burgess@embecosm.com>
+
* tui/tui-regs.c (tui_reg_next_command): Use NULL not 0.
2015-05-21 Andrew Burgess <andrew.burgess@embecosm.com>
@@ -82,6 +82,9 @@ record bts
compile print
Evaluate expression by using the compiler and print result.
+layout cli
+ Leave tui mode and return to cli mode.
+
* New options
set max-completions
@@ -1,3 +1,7 @@
+2015-05-21 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * gdb.texinfo (TUI Commands): Add 'layout cli' details.
+
2015-05-16 Doug Evans <xdje42@gmail.com>
* guile.texi (Memory Ports in Guile): Document support for unbuffered
@@ -24967,6 +24967,9 @@ Display the source and assembly window.
@item layout regs
Display the register window together with the source or assembly window.
+@item layout cli
+Close all windows and return to CLI mode.
+
@item focus next
@kindex focus
Make the next window active for scrolling.
@@ -358,7 +358,7 @@ layout_completer (struct cmd_list_element *ignore,
const char *text, const char *word)
{
static const char *layout_names [] =
- { "src", "asm", "split", "regs", "next", "prev", NULL };
+ { "src", "asm", "split", "regs", "cli", "next", "prev", NULL };
return complete_on_enum (layout_names, text, word);
}
@@ -378,6 +378,7 @@ _initialize_tui_layout (void)
Change the layout of windows.\n\
Usage: layout prev | next | <layout_name> \n\
Layout names are:\n\
+ cli : Close windows and return to command line.\n\
src : Displays source and command windows.\n\
asm : Displays disassembly and command windows.\n\
split : Displays source, disassembly and command windows.\n\
@@ -426,6 +427,8 @@ tui_set_layout_by_name (const char *layout_name)
{
if (subset_compare (buf_ptr, "SRC"))
new_layout = SRC_COMMAND;
+ else if (subset_compare (buf_ptr, "CLI"))
+ tui_disable ();
else if (subset_compare (buf_ptr, "ASM"))
new_layout = DISASSEM_COMMAND;
else if (subset_compare (buf_ptr, "SPLIT"))
@@ -445,7 +448,8 @@ tui_set_layout_by_name (const char *layout_name)
else
status = TUI_FAILURE;
- if (status == TUI_SUCCESS)
+ if (status == TUI_SUCCESS
+ && new_layout != UNDEFINED_LAYOUT)
{
/* Make sure the curses mode is enabled. */
tui_enable ();