@@ -2922,14 +2922,6 @@ show_memory_tagging_unsupported (void)
" architecture."));
}
-/* Implement the "memory-tag" prefix command. */
-
-static void
-memory_tag_command (const char *arg, int from_tty)
-{
- help_list (memory_tag_list, "memory-tag ", all_commands, gdb_stdout);
-}
-
/* Helper for print-logical-tag and print-allocation-tag. */
static void
@@ -3386,7 +3378,7 @@ Convert the arguments to a string as \"printf\" would, but then\n\
treat this string as a command line, and evaluate it."));
/* Memory tagging commands. */
- add_prefix_cmd ("memory-tag", class_vars, memory_tag_command, _("\
+ add_basic_prefix_cmd ("memory-tag", class_vars, _("\
Generic command for printing and manipulating memory tag properties."),
&memory_tag_list, 0, &cmdlist);
add_cmd ("print-logical-tag", class_vars,
@@ -1909,22 +1909,6 @@ source_lines_range::source_lines_range (int startline,
}
}
-/* Handle the "set source" base command. */
-
-static void
-set_source (const char *arg, int from_tty)
-{
- help_list (setsourcelist, "set source ", all_commands, gdb_stdout);
-}
-
-/* Handle the "show source" base command. */
-
-static void
-show_source (const char *args, int from_tty)
-{
- help_list (showsourcelist, "show source ", all_commands, gdb_stdout);
-}
-
void _initialize_source ();
void
@@ -2045,13 +2029,12 @@ By default, relative filenames are displayed."),
show_filename_display_string,
&setlist, &showlist);
- add_prefix_cmd ("source", no_class, set_source,
- _("Generic command for setting how sources are handled."),
- &setsourcelist, 0, &setlist);
-
- add_prefix_cmd ("source", no_class, show_source,
- _("Generic command for showing source settings."),
- &showsourcelist, 0, &showlist);
+ add_setshow_prefix_cmd
+ ("source", no_class,
+ _("Generic command for setting how sources are handled."),
+ _("Generic command for showing source settings."),
+ &setsourcelist, &showsourcelist,
+ &setlist, &showlist);
add_setshow_boolean_cmd ("open", class_files, &source_open, _("\
Set whether GDB should open source files."), _("\
@@ -1120,14 +1120,6 @@ destroy_layout (struct cmd_list_element *self, void *context)
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 *
@@ -1307,7 +1299,7 @@ void
_initialize_tui_layout ()
{
struct cmd_list_element *layout_cmd
- = add_prefix_cmd ("layout", class_tui, tui_layout_command, _("\
+ = add_basic_prefix_cmd ("layout", class_tui, _("\
Change the layout of windows.\n\
Usage: tui layout prev | next | LAYOUT-NAME"),
&layout_list, 0, tui_get_cmd_list ());
@@ -1082,14 +1082,6 @@ parse_scrolling_args (const char *arg,
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);
-}
-
/* See tui-win.h. */
bool tui_left_margin_verbose = false;
@@ -1125,9 +1117,9 @@ 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 ());
+ add_basic_prefix_cmd ("window", class_tui,
+ _("Text User Interface window commands."),
+ &tui_window_cmds, 1, tui_get_cmd_list ());
cmd_list_element *winheight_cmd
= add_cmd ("height", class_tui, tui_set_win_height_command, _("\