GNU Binutils with patches for OS216
Révision | 0400cf2f56c41896ecf52b88baa1d6178eb10432 (tree) |
---|---|
l'heure | 2016-04-29 03:11:51 |
Auteur | Simon Marchi <simon.marchi@eric...> |
Commiter | Simon Marchi |
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.
@@ -1,3 +1,8 @@ | ||
1 | +2016-04-28 Simon Marchi <simon.marchi@ericsson.com> | |
2 | + | |
3 | + * cli/cli-decode.c (help_cmd_list): Do not list commands that | |
4 | + are deprecated. | |
5 | + | |
1 | 6 | 2016-04-27 Jan Kratochvil <jan.kratochvil@redhat.com> |
2 | 7 | |
3 | 8 | * remote.c (remote_start_remote): Detect PACKET_vFile_setfs.support. |
@@ -1194,13 +1194,16 @@ help_cmd_list (struct cmd_list_element *list, enum command_class theclass, | ||
1194 | 1194 | for (c = list; c; c = c->next) |
1195 | 1195 | { |
1196 | 1196 | if (c->abbrev_flag == 0 |
1197 | + && !c->cmd_deprecated | |
1197 | 1198 | && (theclass == all_commands |
1198 | 1199 | || (theclass == all_classes && c->func == NULL) |
1199 | 1200 | || (theclass == c->theclass && c->func != NULL))) |
1200 | 1201 | { |
1201 | 1202 | print_help_for_command (c, prefix, recurse, stream); |
1202 | 1203 | } |
1203 | - else if (c->abbrev_flag == 0 && recurse | |
1204 | + else if (c->abbrev_flag == 0 | |
1205 | + && recurse | |
1206 | + && !c->cmd_deprecated | |
1204 | 1207 | && theclass == class_user && c->prefixlist != NULL) |
1205 | 1208 | /* User-defined commands may be subcommands. */ |
1206 | 1209 | help_cmd_list (*c->prefixlist, theclass, c->prefixname, |