aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectTarget.cpp
diff options
context:
space:
mode:
authorShubham Sandeep Rastogi <srastogi22@apple.com>2024-02-19 18:19:36 -0800
committerShubham Sandeep Rastogi <srastogi22@apple.com>2024-02-19 18:19:59 -0800
commit9ed8b272c30a01c450616f0ed8b2373d5d618ebb (patch)
tree767aa897f69692523a196a128d954ba408482708 /lldb/source/Commands/CommandObjectTarget.cpp
parent744616b3aebd008a5ad0e9de9f82f5e284440ab1 (diff)
downloadllvm-9ed8b272c30a01c450616f0ed8b2373d5d618ebb.zip
llvm-9ed8b272c30a01c450616f0ed8b2373d5d618ebb.tar.gz
llvm-9ed8b272c30a01c450616f0ed8b2373d5d618ebb.tar.bz2
Revert "Centralize the handling of completion for simple argument lists. (#82085)"
This reverts commit 21631494b068d9364b8dc8f18e59adee9131a0a5. Reverted because of greendragon failure: ******************** TEST 'lldb-api :: functionalities/completion/TestCompletion.py' FAILED ******************** Script:
Diffstat (limited to 'lldb/source/Commands/CommandObjectTarget.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectTarget.cpp29
1 files changed, 26 insertions, 3 deletions
diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp
index 4e006e4..c3ecdb7 100644
--- a/lldb/source/Commands/CommandObjectTarget.cpp
+++ b/lldb/source/Commands/CommandObjectTarget.cpp
@@ -257,6 +257,13 @@ public:
Options *GetOptions() override { return &m_option_group; }
+ void
+ HandleArgumentCompletion(CompletionRequest &request,
+ OptionElementVector &opt_element_vector) override {
+ lldb_private::CommandCompletions::InvokeCommonCompletionCallbacks(
+ GetCommandInterpreter(), lldb::eDiskFileCompletion, request, nullptr);
+ }
+
protected:
void DoExecute(Args &command, CommandReturnObject &result) override {
const size_t argc = command.GetArgumentCount();
@@ -2782,6 +2789,13 @@ public:
Options *GetOptions() override { return &m_option_group; }
+ void
+ HandleArgumentCompletion(CompletionRequest &request,
+ OptionElementVector &opt_element_vector) override {
+ lldb_private::CommandCompletions::InvokeCommonCompletionCallbacks(
+ GetCommandInterpreter(), lldb::eDiskFileCompletion, request, nullptr);
+ }
+
protected:
OptionGroupOptions m_option_group;
OptionGroupUUID m_uuid_option_group;
@@ -3219,7 +3233,7 @@ public:
: CommandObjectParsed(
interpreter, "target modules list",
"List current executable and dependent shared library images.") {
- CommandArgumentData module_arg{eArgTypeModule, eArgRepeatStar};
+ CommandArgumentData module_arg{eArgTypeShlibName, eArgRepeatStar};
m_arguments.push_back({module_arg});
}
@@ -4329,6 +4343,13 @@ public:
~CommandObjectTargetSymbolsAdd() override = default;
+ void
+ HandleArgumentCompletion(CompletionRequest &request,
+ OptionElementVector &opt_element_vector) override {
+ lldb_private::CommandCompletions::InvokeCommonCompletionCallbacks(
+ GetCommandInterpreter(), lldb::eDiskFileCompletion, request, nullptr);
+ }
+
Options *GetOptions() override { return &m_option_group; }
protected:
@@ -5174,7 +5195,8 @@ public:
OptionElementVector &opt_element_vector) override {
if (request.GetCursorIndex())
return;
- CommandObject::HandleArgumentCompletion(request, opt_element_vector);
+ lldb_private::CommandCompletions::InvokeCommonCompletionCallbacks(
+ GetCommandInterpreter(), lldb::eStopHookIDCompletion, request, nullptr);
}
protected:
@@ -5229,7 +5251,8 @@ public:
OptionElementVector &opt_element_vector) override {
if (request.GetCursorIndex())
return;
- CommandObject::HandleArgumentCompletion(request, opt_element_vector);
+ lldb_private::CommandCompletions::InvokeCommonCompletionCallbacks(
+ GetCommandInterpreter(), lldb::eStopHookIDCompletion, request, nullptr);
}
protected: