aboutsummaryrefslogtreecommitdiff
path: root/gdb/command.h
diff options
context:
space:
mode:
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>2020-05-10 20:21:51 +0200
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>2020-05-15 22:17:45 +0200
commit7c05caf72d31d7382819f1113fdcf13c45729a8d (patch)
tree4baa0c3c7e840e40efa84c744ae591b3aac88de5 /gdb/command.h
parent3b3aaacba15292f185b6e8ba5faba1ed89c9f908 (diff)
downloadfsf-binutils-gdb-7c05caf72d31d7382819f1113fdcf13c45729a8d.zip
fsf-binutils-gdb-7c05caf72d31d7382819f1113fdcf13c45729a8d.tar.gz
fsf-binutils-gdb-7c05caf72d31d7382819f1113fdcf13c45729a8d.tar.bz2
Fix/improve 'apropos' output
Similarly to 'help CLASS', apropos possibly shows several times the same help (for the command and for each of its aliases). This patch changes 'apropos' so that the help for a command and all its aliases is shown once. So, apropos_cmd now skips all aliases/abbreviations, as these are printed as part of the help of the aliased command. When 'apropos' prints the help of a command, function 'help_cmd' now unconditionally print the command name and its possible aliases (as we must indicate to the user the command/aliases for which the help is printed). When 'help somecommand' prints the help of a command, if the command is not aliased, the command name is not printed (to avoid a useless first line), but if it has aliases, then the command name and all its aliases are now printed. In addition to provide to the user the choice of the best way to type a command, it also avoids the strange behaviour that the output of 'help somealias' does not mention somealias. gdb/ChangeLog 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be> * cli/cli-decode.c (apropos_cmd): Produce output for aliases when their aliased command is traversed. (help_cmd): Add fput_command_names_styled call to output command name and aliases when command has an alias. gdb/testsuite/ChangeLog 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be> * gdb.base/help.exp: Test apropos and help for commands having aliases. Fixed comments not starting with an upper-case letter or not finishing with a dot.
Diffstat (limited to 'gdb/command.h')
0 files changed, 0 insertions, 0 deletions