[2/4] Use command style in "help" command

Message ID 20250112-submit-help-list-style-title-v1-2-9457a2686440@tromey.com
State New
Headers
Series More command styling changes |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_gdb_check--master-arm success Test passed
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 success Test passed

Commit Message

Tom Tromey Jan. 12, 2025, 12:03 p.m. UTC
  This changes the help command to use the new command style when
displaying text like:

    List of "catch" subcommands:

As a side effect, this mildly -- but not hugely -- cleans up some i18n
issues in help_list.  The header comment for that function is also
changed to the gdb style.

Finally, this function used to print something like:

    Type "help catch" followed by catch subcommand name for full documentation.

The second "catch" here seems redundant to me, so this patch removes
it.
---
 gdb/cli/cli-cmds.c                    |  2 +-
 gdb/cli/cli-decode.c                  | 89 +++++++++++++++++++----------------
 gdb/cli/cli-decode.h                  |  3 ++
 gdb/testsuite/gdb.base/completion.exp |  4 +-
 gdb/testsuite/gdb.base/default.exp    | 36 +++++++-------
 gdb/testsuite/gdb.btrace/cpu.exp      |  4 +-
 gdb/testsuite/gdb.cp/maint.exp        |  2 +-
 gdb/testsuite/lib/gdb.exp             |  4 +-
 gdb/top.c                             |  6 +--
 9 files changed, 80 insertions(+), 70 deletions(-)
  

Patch

diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index 0140c717ca2bf2afef83325492eb8e779b6ae919..84478228eec7a7cbd595619a45a4ab4f341c323e 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -215,7 +215,7 @@  error_no_arg (const char *why)
 static void
 info_command (const char *arg, int from_tty)
 {
-  help_list (infolist, "info ", all_commands, gdb_stdout);
+  help_list (infolist, "info", all_commands, gdb_stdout);
 }
 
 /* See cli/cli-cmds.h.  */
diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c
index 4fbbfcb6aeb9fd8709d6c235d103d7d23c30af8e..96b7d1986aa502b92d24a3a9d58d2ed92acd580c 100644
--- a/gdb/cli/cli-decode.c
+++ b/gdb/cli/cli-decode.c
@@ -127,8 +127,10 @@  set_cmd_completer_handle_brkchars (struct cmd_list_element *cmd,
   cmd->completer_handle_brkchars = func;
 }
 
+/* See cli-decode.h.  */
+
 std::string
-cmd_list_element::prefixname () const
+cmd_list_element::prefixname_no_space () const
 {
   if (!this->is_prefix ())
     /* Not a prefix command.  */
@@ -136,14 +138,27 @@  cmd_list_element::prefixname () const
 
   std::string prefixname;
   if (this->prefix != nullptr)
-    prefixname = this->prefix->prefixname ();
+    {
+      prefixname = this->prefix->prefixname_no_space ();
+      prefixname += " ";
+    }
 
   prefixname += this->name;
-  prefixname += " ";
 
   return prefixname;
 }
 
+/* See cli-decode.h.  */
+
+std::string
+cmd_list_element::prefixname () const
+{
+  std::string result = prefixname_no_space ();
+  if (!result.empty ())
+    result += " ";
+  return result;
+}
+
 /* See cli/cli-decode.h.  */
 
 std::vector<std::string>
@@ -380,7 +395,7 @@  do_prefix_cmd (const char *args, int from_tty, struct cmd_list_element *c)
   while (c->is_alias ())
     c = c->alias_target;
 
-  help_list (*c->subcommands, c->prefixname ().c_str (),
+  help_list (*c->subcommands, c->prefixname_no_space ().c_str (),
 	     all_commands, gdb_stdout);
 }
 
@@ -1803,7 +1818,7 @@  help_cmd (const char *command, struct ui_file *stream)
 
   /* If this is a prefix command, print it's subcommands.  */
   if (c->is_prefix ())
-    help_list (*c->subcommands, c->prefixname ().c_str (),
+    help_list (*c->subcommands, c->prefixname_no_space ().c_str (),
 	       all_commands, stream);
 
   /* If this is a class name, print all of the commands in the class.  */
@@ -1824,54 +1839,48 @@  help_cmd (const char *command, struct ui_file *stream)
 		c->hook_post->name);
 }
 
-/*
- * Get a specific kind of help on a command list.
- *
- * LIST is the list.
- * CMDTYPE is the prefix to use in the title string.
- * THECLASS is the class with which to list the nodes of this list (see
- * documentation for help_cmd_list below),  As usual, ALL_COMMANDS for
- * everything, ALL_CLASSES for just classes, and non-negative for only things
- * in a specific class.
- * and STREAM is the output stream on which to print things.
- * If you call this routine with a class >= 0, it recurses.
- */
+/* Get a specific kind of help on a command list.
+
+   LIST is the list.
+   CMDTYPE is the prefix to use in the title string.  It should not
+   end in a space.
+   THECLASS is the class with which to list the nodes of this list (see
+   documentation for help_cmd_list below),  As usual, ALL_COMMANDS for
+   everything, ALL_CLASSES for just classes, and non-negative for only things
+   in a specific class.
+   and STREAM is the output stream on which to print things.
+   If you call this routine with a class >= 0, it recurses.  */
 void
 help_list (struct cmd_list_element *list, const char *cmdtype,
 	   enum command_class theclass, struct ui_file *stream)
 {
-  int len;
-  char *cmdtype1, *cmdtype2;
-
-  /* If CMDTYPE is "foo ", CMDTYPE1 gets " foo" and CMDTYPE2 gets "foo sub".
-   */
-  len = strlen (cmdtype);
-  cmdtype1 = (char *) alloca (len + 1);
-  cmdtype1[0] = 0;
-  cmdtype2 = (char *) alloca (len + 4);
-  cmdtype2[0] = 0;
-  if (len)
+  int len = strlen (cmdtype);
+  const char *space = "";
+  const char *prefix = "";
+  if (len > 0)
     {
-      cmdtype1[0] = ' ';
-      memcpy (cmdtype1 + 1, cmdtype, len - 1);
-      cmdtype1[len] = 0;
-      memcpy (cmdtype2, cmdtype, len - 1);
-      strcpy (cmdtype2 + len - 1, " sub");
+      prefix = "sub";
+      space = " ";
     }
 
   if (theclass == all_classes)
-    gdb_printf (stream, "List of classes of %scommands:\n\n", cmdtype2);
+    gdb_printf (stream, "List of classes of %scommands:\n\n",
+		prefix);
+  else if (len == 0)
+    gdb_printf (stream, "List of commands:\n\n");
   else
-    gdb_printf (stream, "List of %scommands:\n\n", cmdtype2);
+    gdb_printf (stream, "List of \"%ps\" %scommands:\n\n",
+		styled_string (command_style.style (), cmdtype),
+		prefix);
 
   help_cmd_list (list, theclass, theclass >= 0, stream);
 
   if (theclass == all_classes)
     {
       gdb_printf (stream, "\n\
-Type \"%p[help%s%p]\" followed by a class name for a list of commands in ",
+Type \"%p[help%s%s%p]\" followed by a class name for a list of commands in ",
 		  command_style.style ().ptr (),
-		  cmdtype1,
+		  space, cmdtype,
 		  nullptr);
       stream->wrap_here (0);
       gdb_printf (stream, "that class.");
@@ -1881,9 +1890,9 @@  Type \"%ps\" for the list of all commands.",
 		  styled_string (command_style.style (), "help all"));
     }
 
-  gdb_printf (stream, "\nType \"%p[help%s%p]\" followed by %scommand name ",
-	      command_style.style ().ptr (), cmdtype1, nullptr,
-	      cmdtype2);
+  gdb_printf (stream, "\nType \"%p[help%s%s%p]\" followed by %scommand name ",
+	      command_style.style ().ptr (), space, cmdtype, nullptr,
+	      prefix);
   stream->wrap_here (0);
   gdb_puts ("for ", stream);
   stream->wrap_here (0);
diff --git a/gdb/cli/cli-decode.h b/gdb/cli/cli-decode.h
index ec73c11d17248ffae810b05a592965de8295b371..d726fa0f74216788df7d7f171e287a0a0e366966 100644
--- a/gdb/cli/cli-decode.h
+++ b/gdb/cli/cli-decode.h
@@ -83,6 +83,9 @@  struct cmd_list_element
      For non-prefix commands, return an empty string.  */
   std::string prefixname () const;
 
+  /* Like prefixname, but do not append a trailing space.  */
+  std::string prefixname_no_space () const;
+
   /* Return a vector of strings describing the components of the full name
      of this command.  For example, if this command is 'set AA BB CC',
      then the vector will contain 4 elements 'set', 'AA', 'BB', and 'CC'
diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp
index aea18de9e3f87b43fd2e6ce111e1f1d0728e6cf5..571d714b710eaa033c88ffc3b87f61ac39beacd5 100644
--- a/gdb/testsuite/gdb.base/completion.exp
+++ b/gdb/testsuite/gdb.base/completion.exp
@@ -311,7 +311,7 @@  gdb_test_multiple "" "$test" {
     -re "^info $" {
 	send_gdb "\n"
 	gdb_test_multiple "" "$test" {
-	    -re "List of info subcommands.*$gdb_prompt $" {
+	    -re "List of \"info\" subcommands.*$gdb_prompt $" {
 		pass "$test"
 	    }
 	}
@@ -324,7 +324,7 @@  gdb_test_multiple "" "$test" {
     -re "^info \\\x07$" {
 	send_gdb "\n"
 	gdb_test_multiple "" "$test" {
-	    -re "List of info subcommands:\r\n\r\n.*$gdb_prompt $" {
+	    -re "List of \"info\" subcommands:\r\n\r\n.*$gdb_prompt $" {
 		pass "$test"
 	    }
 	}
diff --git a/gdb/testsuite/gdb.base/default.exp b/gdb/testsuite/gdb.base/default.exp
index bbc95aa0539b86463d9b42c8a7748a6e215161a3..c402249905e9dbc54cc3d410c12324047b366b11 100644
--- a/gdb/testsuite/gdb.base/default.exp
+++ b/gdb/testsuite/gdb.base/default.exp
@@ -28,8 +28,8 @@  set timeout 60
 gdb_test "add-symbol-file" "add-symbol-file takes a file name and an address"
 
 # test append
-gdb_test "append" "List of append subcommands:.*" 
-gdb_test "append binary" "List of append binary subcommands:.*" 
+gdb_test "append" "List of \"append\" subcommands:.*" 
+gdb_test "append binary" "List of \"append binary\" subcommands:.*" 
 gdb_test "append memory" "Missing filename\." 
 gdb_test "append value"  "Missing filename\." 
 gdb_test "append binary memory" "Missing filename\." 
@@ -76,7 +76,7 @@  gdb_test "call" "The history is empty..*"
 
 
 #test catch
-gdb_test "catch" "List of catch subcommands:(\[^\r\n\]*\[\r\n\])+Type \"help catch\" followed by catch subcommand name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous."
+gdb_test "catch" "List of \"catch\" subcommands:(\[^\r\n\]*\[\r\n\])+Type \"help catch\" followed by subcommand name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous."
 
 #test cd
 gdb_test "cd" "Working directory \[^\r\n\]*\(\r\n \\(canonically \[^\r\n\]*\\)\)?\\."
@@ -145,12 +145,12 @@  gdb_test "down" "No stack.*"
 #test down-silently
 gdb_test "down-silently" "No stack."
 # test dump
-gdb_test "dump" "List of dump subcommands:.*" 
-gdb_test "dump binary" "List of dump binary subcommands:.*" 
-gdb_test "dump ihex" "List of dump ihex subcommands:.*" 
+gdb_test "dump" "List of \"dump\" subcommands:.*" 
+gdb_test "dump binary" "List of \"dump binary\" subcommands:.*" 
+gdb_test "dump ihex" "List of \"dump ihex\" subcommands:.*" 
 gdb_test "dump memory" "Missing filename\." 
-gdb_test "dump srec" "List of dump srec subcommands:.*" 
-gdb_test "dump tekhex" "List of dump tekhex subcommands:.*" 
+gdb_test "dump srec" "List of \"dump srec\" subcommands:.*" 
+gdb_test "dump tekhex" "List of \"dump tekhex\" subcommands:.*" 
 gdb_test "dump value" "Missing filename\." 
 gdb_test "dump binary memory" "Missing filename\." 
 gdb_test "dump binary value"  "Missing filename\." 
@@ -251,9 +251,9 @@  gdb_test "help" "List of classes of commands:(\[^\r\n\]*\[\r\n\])+aliases -- Use
 #test handle
 gdb_test "handle" "Argument required .signal to handle.*"
 #test info "i" abbreviation 
-gdb_test "i" "List of info subcommands:(\[^\r\n\]*\[\r\n\])+Type \"help info\" followed by info subcommand name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous." "info \"i\" abbreviation"
+gdb_test "i" "List of \"info\" subcommands:(\[^\r\n\]*\[\r\n\])+Type \"help info\" followed by subcommand name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous." "info \"i\" abbreviation"
 #test info
-gdb_test "info" "List of info subcommands:(\[^\r\n\]*\[\r\n\])+Type \"help info\" followed by info subcommand name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous."
+gdb_test "info" "List of \"info\" subcommands:(\[^\r\n\]*\[\r\n\])+Type \"help info\" followed by subcommand name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous."
 #test ignore
 gdb_test "ignore" "Argument required .a breakpoint number.*"
 #test info address
@@ -456,7 +456,7 @@  gdb_test "nexti" "The program is not being run."
 gdb_test "output" "Argument required .expression to compute.*"
 
 #test overlay
-gdb_test "overlay" "List of overlay subcommands:.*"
+gdb_test "overlay" "List of \"overlay\" subcommands:.*"
 #test a non-existant overlay subcommand
 gdb_test "overlay on"     "Undefined overlay command.* Try \"help overlay\"."
 gdb_test_no_output "overlay manual" "overlay manual #1"
@@ -553,7 +553,7 @@  gdb_test_no_output "set args" "set args"
 
 # Test set check abbreviations
 foreach x {"c" "ch" "check"} {
-    gdb_test "set $x" "List of set check subcommands:(\[^\r\n\]*\[\r\n\])+set check range -- Set range checking(\[^\r\n\]*\[\r\n\])+set check type -- Set strict type checking(\[^\r\n\]*\[\r\n\])+Type \"help set check\" followed by set check subcommand name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous." \
+    gdb_test "set $x" "List of \"set check\" subcommands:(\[^\r\n\]*\[\r\n\])+set check range -- Set range checking(\[^\r\n\]*\[\r\n\])+set check type -- Set strict type checking(\[^\r\n\]*\[\r\n\])+Type \"help set check\" followed by subcommand name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous." \
 	"set check \"$x\" abbreviation"
 }
 
@@ -583,17 +583,17 @@  gdb_test_no_output "set history save" "set history save"
 #test set history size
 gdb_test "set history size" "Argument required .integer to set it to.*"
 #test set history
-gdb_test "set history" "List of set history subcommands:(\[^\r\n\]*\[\r\n\])+set history expansion -- Set history expansion on command input(\[^\r\n\]*\[\r\n\])+set history filename -- Set the filename in which to record the command history(\[^\r\n\]*\[\r\n\])+set history save -- Set saving of the history record on exit(\[^\r\n\]*\[\r\n\])+set history size -- Set the size of the command history(\[^\r\n\]*\[\r\n\])+Type \"help set history\" followed by set history subcommand name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous."
+gdb_test "set history" "List of \"set history\" subcommands:(\[^\r\n\]*\[\r\n\])+set history expansion -- Set history expansion on command input(\[^\r\n\]*\[\r\n\])+set history filename -- Set the filename in which to record the command history(\[^\r\n\]*\[\r\n\])+set history save -- Set saving of the history record on exit(\[^\r\n\]*\[\r\n\])+set history size -- Set the size of the command history(\[^\r\n\]*\[\r\n\])+Type \"help set history\" followed by subcommand name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous."
 #test set language
 gdb_test "set language" "Requires an argument. Valid arguments are auto, local, unknown, ada, asm, c, c.., d, fortran, go, minimal, modula-2, objective-c, opencl, pascal, rust."
 #test set listsize
 gdb_test "set listsize" "Argument required .integer to set it to.*"
 #test set print "p" abbreviation
-gdb_test "set p" "List of set print subcommands:(\[^\r\n\]*\[\r\n\])+Type \"help set print\" followed by set print subcommand name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous." "set print \"p\" abbreviation"
+gdb_test "set p" "List of \"set print\" subcommands:(\[^\r\n\]*\[\r\n\])+Type \"help set print\" followed by subcommand name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous." "set print \"p\" abbreviation"
 #test set print "pr" abbreviation
-gdb_test "set pr" "List of set print subcommands:(\[^\r\n\]*\[\r\n\])+Type \"help set print\" followed by set print subcommand name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous." "set print \"pr\" abbreviation"
+gdb_test "set pr" "List of \"set print\" subcommands:(\[^\r\n\]*\[\r\n\])+Type \"help set print\" followed by subcommand name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous." "set print \"pr\" abbreviation"
 #test set print
-gdb_test "set print" "List of set print subcommands:(\[^\r\n\]*\[\r\n\])+Type \"help set print\" followed by set print subcommand name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous."
+gdb_test "set print" "List of \"set print\" subcommands:(\[^\r\n\]*\[\r\n\])+Type \"help set print\" followed by subcommand name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous."
 #test set print address
 gdb_test_no_output "set print address" "set print address"
 #test set print array
@@ -882,7 +882,7 @@  gdb_expect {
 }
 
 #test target
-gdb_test "target" "List of target subcommands:(\[^\r\n\]*\[\r\n\])+Type \"help target\" followed by target subcommand name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous."
+gdb_test "target" "List of \"target\" subcommands:(\[^\r\n\]*\[\r\n\])+Type \"help target\" followed by subcommand name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous."
 #test tbreak
 gdb_test "tbreak" "No default breakpoint address now."
 #test thread
@@ -915,7 +915,7 @@  gdb_test "unset environment" \
     "y"
 
 #test unset
-gdb_test "unset" "List of unset subcommands:(\[^\r\n\]*\[\r\n\])+unset environment -- Cancel environment variable VAR for the program(\[^\r\n\]*\[\r\n\])+Type \"help unset\" followed by unset subcommand name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous."
+gdb_test "unset" "List of \"unset\" subcommands:(\[^\r\n\]*\[\r\n\])+unset environment -- Cancel environment variable VAR for the program(\[^\r\n\]*\[\r\n\])+Type \"help unset\" followed by subcommand name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous."
 #test up
 #test up-silently
 gdb_test "up-silently" "No stack."
diff --git a/gdb/testsuite/gdb.btrace/cpu.exp b/gdb/testsuite/gdb.btrace/cpu.exp
index 8b830a5d4abeafc5c8d6d3148002c2689b829e84..26ffa09581feac3d9c4e972bc730612afe2f9d08 100644
--- a/gdb/testsuite/gdb.btrace/cpu.exp
+++ b/gdb/testsuite/gdb.btrace/cpu.exp
@@ -42,9 +42,9 @@  proc test_junk { arg junk current } {
 gdb_test "show record btrace cpu" "btrace cpu is 'auto'\." "default cpu"
 
 gdb_test "set record" \
-    "List of set record subcommands.*"
+    "List of \"set record\" subcommands.*"
 gdb_test "set record btrace" \
-    "List of set record btrace subcommands.*"
+    "List of \"set record btrace\" subcommands.*"
 test_bad "" "auto"
 
 test_good "intel: 0/0"
diff --git a/gdb/testsuite/gdb.cp/maint.exp b/gdb/testsuite/gdb.cp/maint.exp
index e53643429f4cc1f1c4a76f9d34a43c8337371e3b..abd59314fff06357ddf98d304fdfc802c9294b5f 100644
--- a/gdb/testsuite/gdb.cp/maint.exp
+++ b/gdb/testsuite/gdb.cp/maint.exp
@@ -32,7 +32,7 @@  proc test_help {} {
         "C\\+\\+ maintenance commands.\r\n\r\n"
     }
 
-    set multiple_help_body "List of maintenance cplus subcommands:.*Command name abbreviations are allowed if unambiguous."
+    set multiple_help_body "List of \"maintenance cplus\" subcommands:.*Command name abbreviations are allowed if unambiguous."
 
     gdb_test "maint cp" $multiple_help_body
 
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 7ee2043f0f88602f64943e5083be2566b1f33692..8c4a66a8a9aa14145fcca84cce38fd901771bc88 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -8701,8 +8701,8 @@  proc test_prefix_command_help { command_list expected_initial_lines args } {
     # Use 'list' and not just {} because we want variables to
     # be expanded in this list.
     set l_stock_body [list\
-         "List of $full_command subcommands\:.*\[\r\n\]+"\
-         "Type \"help $full_command\" followed by $full_command subcommand name for full documentation\.\[\r\n\]+"]
+         "List of \"$full_command\" subcommands\:.*\[\r\n\]+"\
+         "Type \"help $full_command\" followed by subcommand name for full documentation\.\[\r\n\]+"]
     set l_entire_body [concat $expected_initial_lines $l_stock_body $help_list_trailer]
     if {[llength $args]>0} {
         help_test_raw "help ${command}" $l_entire_body [lindex $args 0]
diff --git a/gdb/top.c b/gdb/top.c
index bcaf4dc6a55707b01086fd2eebedf668a1455d74..034aa08e6ff15e2b91e09608021deaf2c44997e2 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -549,12 +549,10 @@  execute_command (const char *p, int from_tty)
 	   that can be followed by its args), report the list of
 	   subcommands.  */
 	{
-	  std::string prefixname = c->prefixname ();
-	  std::string prefixname_no_space
-	    = prefixname.substr (0, prefixname.length () - 1);
+	  std::string prefixname = c->prefixname_no_space ();
 	  gdb_printf
 	    ("\"%s\" must be followed by the name of a subcommand.\n",
-	     prefixname_no_space.c_str ());
+	     prefixname.c_str ());
 	  help_list (*c->subcommands, prefixname.c_str (), all_commands,
 		     gdb_stdout);
 	}