values for this follow the values that can be passed to the GNAT
compiler via the '-gnati' option. The default is ISO-8859-1.
+tui layout
+tui focus
+tui refresh
+tui window height
+ These are the new names for the old 'layout', 'focus', 'refresh',
+ and 'winheight' tui commands respectively. The old names still
+ exist as aliases to these new commands.
+
* Changed commands
print
This command now includes information about the width of the tui
windows in its output.
+layout
+focus
+refresh
+winheight
+ These commands are now aliases for the 'tui layout', 'tui focus',
+ 'tui refresh', and 'tui window height' commands respectively.
+
* GDB's Ada parser now supports an extension for specifying the exact
byte contents of a floating-point literal. This can be useful for
setting floating-point registers to a precise value without loss of
width of the terminal. Because they have weight 2, the source and
assembly windows will be twice the height of the command window.
-@item layout @var{name}
+@kindex tui layout
@kindex layout
+@item tui layout @var{name}
+@itemx layout @var{name}
Changes which TUI windows are displayed. The @var{name} parameter
controls which layout is shown. It can be either one of the built-in
layout names, or the name of a layout defined by the user using
register, assembler, and command windows.
@end table
-@item focus @var{name}
@kindex focus
+@item tui focus @var{name}
+@itemx focus @var{name}
Changes which TUI window is currently active for scrolling. The
@var{name} parameter can be any of the following:
Make the command window active for scrolling.
@end table
-@item refresh
+@kindex tui refresh
@kindex refresh
+@item tui refresh
+@itemx refresh
Refresh the screen. This is similar to typing @kbd{C-L}.
@item tui reg @var{group}
@kindex update
Update the source window and the current execution point.
-@item winheight @var{name} +@var{count}
-@itemx winheight @var{name} -@var{count}
+@kindex tui window height
@kindex winheight
+@item tui window height @var{name} +@var{count}
+@itemx tui window height @var{name} -@var{count}
+@itemx winheight @var{name} +@var{count}
+@itemx winheight @var{name} -@var{count}
Change the height of the window @var{name} by @var{count} lines.
Positive counts increase the height, while negative counts decrease
it. The @var{name} parameter can be the name of any currently visible
static struct cmd_list_element *layout_list;
+/* Called to implement 'tui layout'. */
+
+static void
+tui_layout_command (const char *args, int from_tty)
+{
+ help_list (layout_list, "tui layout ", all_commands, gdb_stdout);
+}
+
/* Add a "layout" command with name NAME that switches to LAYOUT. */
static struct cmd_list_element *
void
_initialize_tui_layout ()
{
- add_basic_prefix_cmd ("layout", class_tui, _("\
+ struct cmd_list_element *layout_cmd
+ = add_prefix_cmd ("layout", class_tui, tui_layout_command, _("\
Change the layout of windows.\n\
-Usage: layout prev | next | LAYOUT-NAME"),
- &layout_list, 0, &cmdlist);
+Usage: tui layout prev | next | LAYOUT-NAME"),
+ &layout_list, 0, tui_get_cmd_list ());
+ add_com_alias ("layout", layout_cmd, class_tui, 0);
add_cmd ("next", class_tui, tui_next_layout_command,
_("Apply the next TUI layout."),
}
}
+/* The list of 'tui window' sub-commands. */
+
+static cmd_list_element *tui_window_cmds = nullptr;
+
+/* Called to implement 'tui window'. */
+
+static void
+tui_window_command (const char *args, int from_tty)
+{
+ help_list (tui_window_cmds, "tui window ", all_commands, gdb_stdout);
+}
+
/* Function to initialize gdb commands, for tui window
manipulation. */
&tui_setlist, &tui_showlist,
&setlist, &showlist);
- add_com ("refresh", class_tui, tui_refresh_all_command,
- _("Refresh the terminal display."));
+ cmd_list_element *refresh_cmd
+ = add_cmd ("refresh", class_tui, tui_refresh_all_command,
+ _("Refresh the terminal display."),
+ tui_get_cmd_list ());
+ add_com_alias ("refresh", refresh_cmd, class_tui, 0);
cmd_list_element *tabset_cmd
= add_com ("tabset", class_tui, tui_set_tab_width_command, _("\
Usage: tabset N"));
deprecate_cmd (tabset_cmd, "set tui tab-width");
+ /* Setup the 'tui window' list of command. */
+ add_prefix_cmd ("window", class_tui, tui_window_command,
+ _("Text User Interface window commands."),
+ &tui_window_cmds, 1, tui_get_cmd_list ());
+
cmd_list_element *winheight_cmd
- = add_com ("winheight", class_tui, tui_set_win_height_command, _("\
+ = add_cmd ("height", class_tui, tui_set_win_height_command, _("\
Set or modify the height of a specified window.\n\
-Usage: winheight WINDOW-NAME [+ | -] NUM-LINES\n\
-Use \"info win\" to see the names of the windows currently being displayed."));
+Usage: tui window height WINDOW-NAME [+ | -] NUM-LINES\n\
+Use \"info win\" to see the names of the windows currently being displayed."),
+ &tui_window_cmds);
+ add_com_alias ("winheight", winheight_cmd, class_tui, 0);
add_com_alias ("wh", winheight_cmd, class_tui, 0);
set_cmd_completer (winheight_cmd, winheight_completer);
add_info ("win", tui_all_windows_info,
_("List of all displayed windows.\n\
Usage: info win"));
cmd_list_element *focus_cmd
- = add_com ("focus", class_tui, tui_set_focus_command, _("\
+ = add_cmd ("focus", class_tui, tui_set_focus_command, _("\
Set focus to named window or next/prev window.\n\
-Usage: focus [WINDOW-NAME | next | prev]\n\
-Use \"info win\" to see the names of the windows currently being displayed."));
+Usage: tui focus [WINDOW-NAME | next | prev]\n\
+Use \"info win\" to see the names of the windows currently being displayed."),
+ tui_get_cmd_list ());
+ add_com_alias ("focus", focus_cmd, class_tui, 0);
add_com_alias ("fs", focus_cmd, class_tui, 0);
set_cmd_completer (focus_cmd, focus_completer);
add_com ("+", class_tui, tui_scroll_forward_command, _("\