diff options
author | Dave Lee <davelee.com@gmail.com> | 2022-01-01 20:07:07 -0800 |
---|---|---|
committer | Dave Lee <davelee.com@gmail.com> | 2022-01-09 12:11:32 -0800 |
commit | 39ea676d9d0ea467b7e5fe2d5c25d22a2d906041 (patch) | |
tree | d2128f861dfa40e46b7790cebbb65174ab46bfff /lldb/source/Commands/CommandObjectScript.cpp | |
parent | 9d9f3e0ec773c6a2c570c8bc7484367bff73190c (diff) | |
download | llvm-39ea676d9d0ea467b7e5fe2d5c25d22a2d906041.zip llvm-39ea676d9d0ea467b7e5fe2d5c25d22a2d906041.tar.gz llvm-39ea676d9d0ea467b7e5fe2d5c25d22a2d906041.tar.bz2 |
[lldb] Compute fully qualified command names in FindCommandsForApropos
Fixes incomplete command names in `apropos` results.
The full command names given by `apropos` have come from command name string
literals given to `CommandObject` constructors. For most commands, this has
been accurate, but some commands have incorrect strings. This results in
`apropos` output that doesn't tell the user the full command name they might
want learn more about. These strings can be fixed.
There's a seperate issue that can't be fixed as easily: plugin commands. With
the way they're implemented, plugin commands have to exclude the root command
from their command name string. To illustrate, the `language objc` subcommand
has to set its command name string to "objc", which results in apropos printing
results as `objc ...` instead of `language objc ...`.
To fix both of these issues, this commit changes `FindCommandsForApropos` to
derive the fully qualified command name using the keys of subcommand maps.
Differential Revision: https://reviews.llvm.org/D116491
(cherry picked from commit b3bfd595a548cd85b12e4e83729436cb73b26f29)
Diffstat (limited to 'lldb/source/Commands/CommandObjectScript.cpp')
0 files changed, 0 insertions, 0 deletions