[all-commits] [llvm/llvm-project] 078003: [lldb] Fix that `process signal` completion always...
Raphael Isemann via All-commits
all-commits at lists.llvm.org
Thu Jul 22 04:51:55 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 078003482e90ff5c7ba047a3d3152f0b0c392b31
https://github.com/llvm/llvm-project/commit/078003482e90ff5c7ba047a3d3152f0b0c392b31
Author: Raphael Isemann <teemperor at gmail.com>
Date: 2021-07-22 (Thu, 22 Jul 2021)
Changed paths:
M lldb/source/Commands/CommandObjectProcess.cpp
M lldb/test/API/functionalities/completion/TestCompletion.py
Log Message:
-----------
[lldb] Fix that `process signal` completion always returns all signals
`CompletionRequest::AddCompletion` adds the given string as completion of the
current command token. `CompletionRequest::TryCompleteCurrentArg` only adds it
if the current token is a prefix of the given string. We're using
`AddCompletion` for the `process signal` handler which means that `process
signal SIGIN` doesn't get uniquely completed to `process signal SIGINT` as we
unconditionally add all other signals (such as `SIGABRT`) as possible
completions.
By using `TryCompleteCurrentArg` we actually do the proper filtering which will
only add `SIGINT` (as that's the only signal with the prefix 'SIGIN' in the
example above).
Reviewed By: mib
Differential Revision: https://reviews.llvm.org/D105028
More information about the All-commits
mailing list