diff options
author | Simon Marchi <simon.marchi@ericsson.com> | 2016-04-28 14:11:38 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@ericsson.com> | 2016-04-28 14:11:51 -0400 |
commit | 0400cf2f56c41896ecf52b88baa1d6178eb10432 (patch) | |
tree | d882e7314792013f85899169af9775ed54c31860 /gdb/cli/cli-decode.c | |
parent | 9080ac9d99e5326286a7df806955a326fcd655b2 (diff) | |
download | gdb-0400cf2f56c41896ecf52b88baa1d6178eb10432.zip gdb-0400cf2f56c41896ecf52b88baa1d6178eb10432.tar.gz gdb-0400cf2f56c41896ecf52b88baa1d6178eb10432.tar.bz2 |
Don't show deprecated commands in help
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.
Diffstat (limited to 'gdb/cli/cli-decode.c')
-rw-r--r-- | gdb/cli/cli-decode.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c index 8a8abda..0d2b137 100644 --- a/gdb/cli/cli-decode.c +++ b/gdb/cli/cli-decode.c @@ -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, |