aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectWatchpoint.cpp
diff options
context:
space:
mode:
authorGongyu Deng <gy_deng@icloud.com>2020-08-11 09:50:28 +0200
committerRaphael Isemann <teemperor@gmail.com>2020-08-11 09:51:55 +0200
commit2e653327e364aae564209af99d3b6a4625e25b68 (patch)
tree756481c1653ee1a67c9bfa2a72ce867f9b27a23f /lldb/source/Commands/CommandObjectWatchpoint.cpp
parentc6d2078a35d536c8fa152fa9205924f8f10cbaac (diff)
downloadllvm-2e653327e364aae564209af99d3b6a4625e25b68.zip
llvm-2e653327e364aae564209af99d3b6a4625e25b68.tar.gz
llvm-2e653327e364aae564209af99d3b6a4625e25b68.tar.bz2
[lldb] tab completion for `watchpoint set variable`
1. Applied the common completion `eVariablePathCompletion` to command `watchpoint set variable`; 2. Added a related test case. Reviewed By: teemperor, JDevlieghere Differential Revision: https://reviews.llvm.org/D84177
Diffstat (limited to 'lldb/source/Commands/CommandObjectWatchpoint.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectWatchpoint.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lldb/source/Commands/CommandObjectWatchpoint.cpp b/lldb/source/Commands/CommandObjectWatchpoint.cpp
index c2a008a..390e241 100644
--- a/lldb/source/Commands/CommandObjectWatchpoint.cpp
+++ b/lldb/source/Commands/CommandObjectWatchpoint.cpp
@@ -823,6 +823,16 @@ corresponding to the byte size of the data type.");
~CommandObjectWatchpointSetVariable() override = default;
+ void
+ HandleArgumentCompletion(CompletionRequest &request,
+ OptionElementVector &opt_element_vector) override {
+ if (request.GetCursorIndex() != 0)
+ return;
+ CommandCompletions::InvokeCommonCompletionCallbacks(
+ GetCommandInterpreter(), CommandCompletions::eVariablePathCompletion,
+ request, nullptr);
+ }
+
Options *GetOptions() override { return &m_option_group; }
protected: