aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandCompletions.cpp
diff options
context:
space:
mode:
authorGongyu Deng <gy_deng@icloud.com>2020-05-27 14:06:28 +0200
committerRaphael Isemann <teemperor@gmail.com>2020-05-27 14:11:16 +0200
commit763bc2305797c980a4f4fa2f6314ed78a010678d (patch)
treeb0d875b9dd0f3d4cb6aa31d64584575dbaa5112d /lldb/source/Commands/CommandCompletions.cpp
parentc7593b0f0d28f6b7f9fa4557ce73197a49b37799 (diff)
downloadllvm-763bc2305797c980a4f4fa2f6314ed78a010678d.zip
llvm-763bc2305797c980a4f4fa2f6314ed78a010678d.tar.gz
llvm-763bc2305797c980a4f4fa2f6314ed78a010678d.tar.bz2
[lldb] Tab completion for process plugin name
Summary: 1. Added tab completion to `process launch -p`, `process attach -P`, `process connect -p`; 2. Bound the plugin name common completion as the default completion for `eArgTypePlugin` arguments. Reviewers: teemperor, JDevlieghere Tags: #lldb Differential Revision: https://reviews.llvm.org/D79929
Diffstat (limited to 'lldb/source/Commands/CommandCompletions.cpp')
-rw-r--r--lldb/source/Commands/CommandCompletions.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lldb/source/Commands/CommandCompletions.cpp b/lldb/source/Commands/CommandCompletions.cpp
index d4e4f6a..11198f6 100644
--- a/lldb/source/Commands/CommandCompletions.cpp
+++ b/lldb/source/Commands/CommandCompletions.cpp
@@ -58,6 +58,7 @@ bool CommandCompletions::InvokeCommonCompletionCallbacks(
{eVariablePathCompletion, CommandCompletions::VariablePath},
{eRegisterCompletion, CommandCompletions::Registers},
{eBreakpointCompletion, CommandCompletions::Breakpoints},
+ {eProcessPluginCompletion, CommandCompletions::ProcessPluginNames},
{eNoCompletion, nullptr} // This one has to be last in the list.
};
@@ -582,3 +583,10 @@ void CommandCompletions::Breakpoints(CommandInterpreter &interpreter,
request.TryCompleteCurrentArg(std::to_string(bp->GetID()), bp_info);
}
}
+
+void CommandCompletions::ProcessPluginNames(CommandInterpreter &interpreter,
+ CompletionRequest &request,
+ SearchFilter *searcher) {
+ PluginManager::AutoCompleteProcessName(request.GetCursorArgumentPrefix(),
+ request);
+} \ No newline at end of file