Don't show deprecated commands in help
authorSimon Marchi <simon.marchi@ericsson.com>
Thu, 28 Apr 2016 18:11:38 +0000 (14:11 -0400)
committerSimon Marchi <simon.marchi@ericsson.com>
Thu, 28 Apr 2016 18:11:51 +0000 (14:11 -0400)
Just like completion doesn't show deprecated commands, I think that help
should not list them, so that we don't incite users to use them.

gdb/ChangeLog:

* cli/cli-decode.c (help_cmd_list): Do not list commands that
are deprecated.

gdb/ChangeLog
gdb/cli/cli-decode.c

index 5cf8a5ff1798478cfbdf449b508d40226699aec4..6d7bfb27ee8c8b967cb0575b126254b4893abfdc 100644 (file)
@@ -1,3 +1,8 @@
+2016-04-28  Simon Marchi  <simon.marchi@ericsson.com>
+
+       * cli/cli-decode.c (help_cmd_list): Do not list commands that
+       are deprecated.
+
 2016-04-27  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        * remote.c (remote_start_remote): Detect PACKET_vFile_setfs.support.
index 8a8abdaf06aeb8a7db7152091ed4c50ae6722e97..0d2b1376071b92798cfb8f3f3e74246b4c03e7e3 100644 (file)
@@ -1194,13 +1194,16 @@ help_cmd_list (struct cmd_list_element *list, enum command_class theclass,
   for (c = list; c; c = c->next)
     {
       if (c->abbrev_flag == 0
+         && !c->cmd_deprecated
          && (theclass == all_commands
              || (theclass == all_classes && c->func == NULL)
              || (theclass == c->theclass && c->func != NULL)))
        {
          print_help_for_command (c, prefix, recurse, stream);
        }
-      else if (c->abbrev_flag == 0 && recurse
+      else if (c->abbrev_flag == 0
+              && recurse
+              && !c->cmd_deprecated
               && theclass == class_user && c->prefixlist != NULL)
        /* User-defined commands may be subcommands.  */
        help_cmd_list (*c->prefixlist, theclass, c->prefixname,
This page took 0.028071 seconds and 4 git commands to generate.