aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands
diff options
context:
space:
mode:
authorjimingham <jingham@apple.com>2024-02-19 16:43:08 -0800
committerGitHub <noreply@github.com>2024-02-19 16:43:08 -0800
commit21631494b068d9364b8dc8f18e59adee9131a0a5 (patch)
tree35a7935c825cab7bfb61cc510da00e7b5b1350fa /lldb/source/Commands
parent4345b20508b5702c69dd1649c251c4615014dbd2 (diff)
downloadllvm-21631494b068d9364b8dc8f18e59adee9131a0a5.zip
llvm-21631494b068d9364b8dc8f18e59adee9131a0a5.tar.gz
llvm-21631494b068d9364b8dc8f18e59adee9131a0a5.tar.bz2
Centralize the handling of completion for simple argument lists. (#82085)
Most commands were adding argument completion handling by themselves, resulting in a lot of unnecessary boilerplate. In many cases, this could be done generically given the argument definition and the entries in the g_argument_table. I'm going to address this in a couple passes. In this first pass, I added handling of commands that have only one argument list, with one argument type, either single or repeated, and changed all the commands that are of this sort (and don't have other bits of business in their completers.) I also added some missing connections between arg types and completions to the table, and added a RemoteFilename and RemotePath to use in places where we were using the Remote completers. Those arguments used to say they were "files" but they were in fact remote files. I also added a module arg type to use where we were using the module completer. In that case, we should call the argument module.
Diffstat (limited to 'lldb/source/Commands')
-rw-r--r--lldb/source/Commands/CommandObjectCommands.cpp14
-rw-r--r--lldb/source/Commands/CommandObjectDWIMPrint.cpp6
-rw-r--r--lldb/source/Commands/CommandObjectDWIMPrint.h4
-rw-r--r--lldb/source/Commands/CommandObjectFrame.cpp19
-rw-r--r--lldb/source/Commands/CommandObjectPlatform.cpp75
-rw-r--r--lldb/source/Commands/CommandObjectPlugin.cpp7
-rw-r--r--lldb/source/Commands/CommandObjectProcess.cpp19
-rw-r--r--lldb/source/Commands/CommandObjectRegister.cpp7
-rw-r--r--lldb/source/Commands/CommandObjectSession.cpp7
-rw-r--r--lldb/source/Commands/CommandObjectSettings.cpp8
-rw-r--r--lldb/source/Commands/CommandObjectTarget.cpp29
-rw-r--r--lldb/source/Commands/CommandObjectThread.cpp13
-rw-r--r--lldb/source/Commands/CommandObjectType.cpp32
-rw-r--r--lldb/source/Commands/CommandObjectWatchpoint.cpp10
14 files changed, 25 insertions, 225 deletions
diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp
index b7cd650..7c459bd 100644
--- a/lldb/source/Commands/CommandObjectCommands.cpp
+++ b/lldb/source/Commands/CommandObjectCommands.cpp
@@ -63,13 +63,6 @@ public:
return std::string("");
}
- void
- HandleArgumentCompletion(CompletionRequest &request,
- OptionElementVector &opt_element_vector) override {
- lldb_private::CommandCompletions::InvokeCommonCompletionCallbacks(
- GetCommandInterpreter(), lldb::eDiskFileCompletion, request, nullptr);
- }
-
Options *GetOptions() override { return &m_options; }
protected:
@@ -1968,13 +1961,6 @@ public:
~CommandObjectCommandsScriptImport() 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_options; }
protected:
diff --git a/lldb/source/Commands/CommandObjectDWIMPrint.cpp b/lldb/source/Commands/CommandObjectDWIMPrint.cpp
index 695f3d7..fb2cc106 100644
--- a/lldb/source/Commands/CommandObjectDWIMPrint.cpp
+++ b/lldb/source/Commands/CommandObjectDWIMPrint.cpp
@@ -52,12 +52,6 @@ CommandObjectDWIMPrint::CommandObjectDWIMPrint(CommandInterpreter &interpreter)
Options *CommandObjectDWIMPrint::GetOptions() { return &m_option_group; }
-void CommandObjectDWIMPrint::HandleArgumentCompletion(
- CompletionRequest &request, OptionElementVector &opt_element_vector) {
- lldb_private::CommandCompletions::InvokeCommonCompletionCallbacks(
- GetCommandInterpreter(), lldb::eVariablePathCompletion, request, nullptr);
-}
-
void CommandObjectDWIMPrint::DoExecute(StringRef command,
CommandReturnObject &result) {
m_option_group.NotifyOptionParsingStarting(&m_exe_ctx);
diff --git a/lldb/source/Commands/CommandObjectDWIMPrint.h b/lldb/source/Commands/CommandObjectDWIMPrint.h
index d868f89..01ba9c2 100644
--- a/lldb/source/Commands/CommandObjectDWIMPrint.h
+++ b/lldb/source/Commands/CommandObjectDWIMPrint.h
@@ -39,10 +39,6 @@ public:
bool WantsCompletion() override { return true; }
- void
- HandleArgumentCompletion(CompletionRequest &request,
- OptionElementVector &opt_element_vector) override;
-
private:
void DoExecute(llvm::StringRef command, CommandReturnObject &result) override;
diff --git a/lldb/source/Commands/CommandObjectFrame.cpp b/lldb/source/Commands/CommandObjectFrame.cpp
index a4d3fb6..f092d54 100644
--- a/lldb/source/Commands/CommandObjectFrame.cpp
+++ b/lldb/source/Commands/CommandObjectFrame.cpp
@@ -286,16 +286,6 @@ public:
~CommandObjectFrameSelect() override = default;
- void
- HandleArgumentCompletion(CompletionRequest &request,
- OptionElementVector &opt_element_vector) override {
- if (request.GetCursorIndex() != 0)
- return;
-
- lldb_private::CommandCompletions::InvokeCommonCompletionCallbacks(
- GetCommandInterpreter(), lldb::eFrameIndexCompletion, request, nullptr);
- }
-
Options *GetOptions() override { return &m_options; }
protected:
@@ -446,15 +436,6 @@ may even involve JITing and running code in the target program.)");
Options *GetOptions() override { return &m_option_group; }
- void
- HandleArgumentCompletion(CompletionRequest &request,
- OptionElementVector &opt_element_vector) override {
- // Arguments are the standard source file completer.
- lldb_private::CommandCompletions::InvokeCommonCompletionCallbacks(
- GetCommandInterpreter(), lldb::eVariablePathCompletion, request,
- nullptr);
- }
-
protected:
llvm::StringRef GetScopeString(VariableSP var_sp) {
if (!var_sp)
diff --git a/lldb/source/Commands/CommandObjectPlatform.cpp b/lldb/source/Commands/CommandObjectPlatform.cpp
index 790f1db..b25c391 100644
--- a/lldb/source/Commands/CommandObjectPlatform.cpp
+++ b/lldb/source/Commands/CommandObjectPlatform.cpp
@@ -418,7 +418,7 @@ public:
: CommandObjectParsed(interpreter, "platform mkdir",
"Make a new directory on the remote end.", nullptr,
0) {
- CommandArgumentData thread_arg{eArgTypePath, eArgRepeatPlain};
+ CommandArgumentData thread_arg{eArgTypeRemotePath, eArgRepeatPlain};
m_arguments.push_back({thread_arg});
}
@@ -467,21 +467,12 @@ public:
CommandObjectPlatformFOpen(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "platform file open",
"Open a file on the remote end.", nullptr, 0) {
- CommandArgumentData path_arg{eArgTypePath, eArgRepeatPlain};
+ CommandArgumentData path_arg{eArgTypeRemotePath, eArgRepeatPlain};
m_arguments.push_back({path_arg});
}
~CommandObjectPlatformFOpen() override = default;
- void
- HandleArgumentCompletion(CompletionRequest &request,
- OptionElementVector &opt_element_vector) override {
- if (request.GetCursorIndex() == 0)
- lldb_private::CommandCompletions::InvokeCommonCompletionCallbacks(
- GetCommandInterpreter(), lldb::eRemoteDiskFileCompletion, request,
- nullptr);
- }
-
void DoExecute(Args &args, CommandReturnObject &result) override {
PlatformSP platform_sp(
GetDebugger().GetPlatformList().GetSelectedPlatform());
@@ -795,7 +786,7 @@ public:
CommandArgumentData file_arg_remote, file_arg_host;
// Define the first (and only) variant of this arg.
- file_arg_remote.arg_type = eArgTypeFilename;
+ file_arg_remote.arg_type = eArgTypeRemoteFilename;
file_arg_remote.arg_repetition = eArgRepeatPlain;
// There is only one variant this argument could be; put it into the
// argument entry.
@@ -876,7 +867,7 @@ public:
CommandArgumentData file_arg_remote;
// Define the first (and only) variant of this arg.
- file_arg_remote.arg_type = eArgTypeFilename;
+ file_arg_remote.arg_type = eArgTypeRemoteFilename;
file_arg_remote.arg_repetition = eArgRepeatPlain;
// There is only one variant this argument could be; put it into the
// argument entry.
@@ -888,17 +879,6 @@ public:
~CommandObjectPlatformGetSize() override = default;
- void
- HandleArgumentCompletion(CompletionRequest &request,
- OptionElementVector &opt_element_vector) override {
- if (request.GetCursorIndex() != 0)
- return;
-
- lldb_private::CommandCompletions::InvokeCommonCompletionCallbacks(
- GetCommandInterpreter(), lldb::eRemoteDiskFileCompletion, request,
- nullptr);
- }
-
void DoExecute(Args &args, CommandReturnObject &result) override {
// If the number of arguments is incorrect, issue an error message.
if (args.GetArgumentCount() != 1) {
@@ -946,7 +926,7 @@ public:
CommandArgumentData file_arg_remote;
// Define the first (and only) variant of this arg.
- file_arg_remote.arg_type = eArgTypeFilename;
+ file_arg_remote.arg_type = eArgTypeRemoteFilename;
file_arg_remote.arg_repetition = eArgRepeatPlain;
// There is only one variant this argument could be; put it into the
// argument entry.
@@ -958,17 +938,6 @@ public:
~CommandObjectPlatformGetPermissions() override = default;
- void
- HandleArgumentCompletion(CompletionRequest &request,
- OptionElementVector &opt_element_vector) override {
- if (request.GetCursorIndex() != 0)
- return;
-
- lldb_private::CommandCompletions::InvokeCommonCompletionCallbacks(
- GetCommandInterpreter(), lldb::eRemoteDiskFileCompletion, request,
- nullptr);
- }
-
void DoExecute(Args &args, CommandReturnObject &result) override {
// If the number of arguments is incorrect, issue an error message.
if (args.GetArgumentCount() != 1) {
@@ -1015,7 +984,7 @@ public:
CommandArgumentData file_arg_remote;
// Define the first (and only) variant of this arg.
- file_arg_remote.arg_type = eArgTypeFilename;
+ file_arg_remote.arg_type = eArgTypeRemoteFilename;
file_arg_remote.arg_repetition = eArgRepeatPlain;
// There is only one variant this argument could be; put it into the
// argument entry.
@@ -1027,17 +996,6 @@ public:
~CommandObjectPlatformFileExists() override = default;
- void
- HandleArgumentCompletion(CompletionRequest &request,
- OptionElementVector &opt_element_vector) override {
- if (request.GetCursorIndex() != 0)
- return;
-
- lldb_private::CommandCompletions::InvokeCommonCompletionCallbacks(
- GetCommandInterpreter(), lldb::eRemoteDiskFileCompletion, request,
- nullptr);
- }
-
void DoExecute(Args &args, CommandReturnObject &result) override {
// If the number of arguments is incorrect, issue an error message.
if (args.GetArgumentCount() != 1) {
@@ -1080,7 +1038,7 @@ public:
Omitting the destination places the file in the platform working directory.)");
CommandArgumentData source_arg{eArgTypePath, eArgRepeatPlain};
- CommandArgumentData path_arg{eArgTypePath, eArgRepeatOptional};
+ CommandArgumentData path_arg{eArgTypeRemotePath, eArgRepeatOptional};
m_arguments.push_back({source_arg});
m_arguments.push_back({path_arg});
}
@@ -1139,6 +1097,16 @@ public:
m_arguments.push_back({run_arg_arg});
}
+ void
+ HandleArgumentCompletion(CompletionRequest &request,
+ OptionElementVector &opt_element_vector) override {
+ // I didn't make a type for RemoteRunArgs, but since we're going to run
+ // this on the remote system we should use the remote completer.
+ lldb_private::CommandCompletions::InvokeCommonCompletionCallbacks(
+ GetCommandInterpreter(), lldb::eRemoteDiskFileCompletion, request,
+ nullptr);
+ }
+
~CommandObjectPlatformProcessLaunch() override = default;
Options *GetOptions() override { return &m_all_options; }
@@ -1552,13 +1520,6 @@ public:
~CommandObjectPlatformProcessInfo() override = default;
- void
- HandleArgumentCompletion(CompletionRequest &request,
- OptionElementVector &opt_element_vector) override {
- lldb_private::CommandCompletions::InvokeCommonCompletionCallbacks(
- GetCommandInterpreter(), lldb::eProcessIDCompletion, request, nullptr);
- }
-
protected:
void DoExecute(Args &args, CommandReturnObject &result) override {
Target *target = GetDebugger().GetSelectedTarget().get();
@@ -1850,7 +1811,7 @@ public:
"Install a target (bundle or executable file) to the remote end.",
"platform target-install <local-thing> <remote-sandbox>", 0) {
CommandArgumentData local_arg{eArgTypePath, eArgRepeatPlain};
- CommandArgumentData remote_arg{eArgTypePath, eArgRepeatPlain};
+ CommandArgumentData remote_arg{eArgTypeRemotePath, eArgRepeatPlain};
m_arguments.push_back({local_arg});
m_arguments.push_back({remote_arg});
}
diff --git a/lldb/source/Commands/CommandObjectPlugin.cpp b/lldb/source/Commands/CommandObjectPlugin.cpp
index f228851..da3b5f0 100644
--- a/lldb/source/Commands/CommandObjectPlugin.cpp
+++ b/lldb/source/Commands/CommandObjectPlugin.cpp
@@ -36,13 +36,6 @@ public:
~CommandObjectPluginLoad() override = default;
- 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 {
size_t argc = command.GetArgumentCount();
diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp
index 722b0e0..7cd5ad6 100644
--- a/lldb/source/Commands/CommandObjectProcess.cpp
+++ b/lldb/source/Commands/CommandObjectProcess.cpp
@@ -143,14 +143,6 @@ public:
~CommandObjectProcessLaunch() 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_all_options; }
std::optional<std::string> GetRepeatCommand(Args &current_command_args,
@@ -1015,9 +1007,7 @@ public:
OptionElementVector &opt_element_vector) override {
if (!m_exe_ctx.HasProcessScope())
return;
-
- lldb_private::CommandCompletions::InvokeCommonCompletionCallbacks(
- GetCommandInterpreter(), lldb::eDiskFileCompletion, request, nullptr);
+ CommandObject::HandleArgumentCompletion(request, opt_element_vector);
}
Options *GetOptions() override { return &m_options; }
@@ -1292,13 +1282,6 @@ public:
Options *GetOptions() override { return &m_options; }
- void
- HandleArgumentCompletion(CompletionRequest &request,
- OptionElementVector &opt_element_vector) override {
- CommandCompletions::InvokeCommonCompletionCallbacks(
- GetCommandInterpreter(), lldb::eDiskFileCompletion, request, nullptr);
- }
-
class CommandOptions : public Options {
public:
CommandOptions() = default;
diff --git a/lldb/source/Commands/CommandObjectRegister.cpp b/lldb/source/Commands/CommandObjectRegister.cpp
index a4d53e5..4ffdde1 100644
--- a/lldb/source/Commands/CommandObjectRegister.cpp
+++ b/lldb/source/Commands/CommandObjectRegister.cpp
@@ -80,9 +80,7 @@ public:
OptionElementVector &opt_element_vector) override {
if (!m_exe_ctx.HasProcessScope())
return;
-
- lldb_private::CommandCompletions::InvokeCommonCompletionCallbacks(
- GetCommandInterpreter(), lldb::eRegisterCompletion, request, nullptr);
+ CommandObject::HandleArgumentCompletion(request, opt_element_vector);
}
Options *GetOptions() override { return &m_option_group; }
@@ -440,8 +438,7 @@ different for the same register when connected to different debug servers.)");
OptionElementVector &opt_element_vector) override {
if (!m_exe_ctx.HasProcessScope() || request.GetCursorIndex() != 0)
return;
- CommandCompletions::InvokeCommonCompletionCallbacks(
- GetCommandInterpreter(), lldb::eRegisterCompletion, request, nullptr);
+ CommandObject::HandleArgumentCompletion(request, opt_element_vector);
}
protected:
diff --git a/lldb/source/Commands/CommandObjectSession.cpp b/lldb/source/Commands/CommandObjectSession.cpp
index d140bdf..28506d6 100644
--- a/lldb/source/Commands/CommandObjectSession.cpp
+++ b/lldb/source/Commands/CommandObjectSession.cpp
@@ -28,13 +28,6 @@ public:
~CommandObjectSessionSave() override = default;
- void
- HandleArgumentCompletion(CompletionRequest &request,
- OptionElementVector &opt_element_vector) override {
- lldb_private::CommandCompletions::InvokeCommonCompletionCallbacks(
- GetCommandInterpreter(), lldb::eDiskFileCompletion, request, nullptr);
- }
-
protected:
void DoExecute(Args &args, CommandReturnObject &result) override {
llvm::StringRef file_path;
diff --git a/lldb/source/Commands/CommandObjectSettings.cpp b/lldb/source/Commands/CommandObjectSettings.cpp
index 5fb7dcc..0cf3d1d 100644
--- a/lldb/source/Commands/CommandObjectSettings.cpp
+++ b/lldb/source/Commands/CommandObjectSettings.cpp
@@ -262,14 +262,6 @@ public:
~CommandObjectSettingsShow() override = default;
- void
- HandleArgumentCompletion(CompletionRequest &request,
- OptionElementVector &opt_element_vector) override {
- lldb_private::CommandCompletions::InvokeCommonCompletionCallbacks(
- GetCommandInterpreter(), lldb::eSettingsNameCompletion, request,
- nullptr);
- }
-
protected:
void DoExecute(Args &args, CommandReturnObject &result) override {
result.SetStatus(eReturnStatusSuccessFinishResult);
diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp
index c3ecdb7..4e006e4 100644
--- a/lldb/source/Commands/CommandObjectTarget.cpp
+++ b/lldb/source/Commands/CommandObjectTarget.cpp
@@ -257,13 +257,6 @@ 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();
@@ -2789,13 +2782,6 @@ 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;
@@ -3233,7 +3219,7 @@ public:
: CommandObjectParsed(
interpreter, "target modules list",
"List current executable and dependent shared library images.") {
- CommandArgumentData module_arg{eArgTypeShlibName, eArgRepeatStar};
+ CommandArgumentData module_arg{eArgTypeModule, eArgRepeatStar};
m_arguments.push_back({module_arg});
}
@@ -4343,13 +4329,6 @@ 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:
@@ -5195,8 +5174,7 @@ public:
OptionElementVector &opt_element_vector) override {
if (request.GetCursorIndex())
return;
- lldb_private::CommandCompletions::InvokeCommonCompletionCallbacks(
- GetCommandInterpreter(), lldb::eStopHookIDCompletion, request, nullptr);
+ CommandObject::HandleArgumentCompletion(request, opt_element_vector);
}
protected:
@@ -5251,8 +5229,7 @@ public:
OptionElementVector &opt_element_vector) override {
if (request.GetCursorIndex())
return;
- lldb_private::CommandCompletions::InvokeCommonCompletionCallbacks(
- GetCommandInterpreter(), lldb::eStopHookIDCompletion, request, nullptr);
+ CommandObject::HandleArgumentCompletion(request, opt_element_vector);
}
protected:
diff --git a/lldb/source/Commands/CommandObjectThread.cpp b/lldb/source/Commands/CommandObjectThread.cpp
index a1e7e3f..52e493b 100644
--- a/lldb/source/Commands/CommandObjectThread.cpp
+++ b/lldb/source/Commands/CommandObjectThread.cpp
@@ -403,10 +403,7 @@ public:
OptionElementVector &opt_element_vector) override {
if (request.GetCursorIndex())
return;
-
- lldb_private::CommandCompletions::InvokeCommonCompletionCallbacks(
- GetCommandInterpreter(), lldb::eThreadIndexCompletion, request,
- nullptr);
+ CommandObject::HandleArgumentCompletion(request, opt_element_vector);
}
Options *GetOptions() override { return &m_all_options; }
@@ -663,14 +660,6 @@ public:
~CommandObjectThreadContinue() override = default;
- void
- HandleArgumentCompletion(CompletionRequest &request,
- OptionElementVector &opt_element_vector) override {
- lldb_private::CommandCompletions::InvokeCommonCompletionCallbacks(
- GetCommandInterpreter(), lldb::eThreadIndexCompletion, request,
- nullptr);
- }
-
void DoExecute(Args &command, CommandReturnObject &result) override {
bool synchronous_execution = m_interpreter.GetSynchronous();
diff --git a/lldb/source/Commands/CommandObjectType.cpp b/lldb/source/Commands/CommandObjectType.cpp
index f76420f..036b8e9 100644
--- a/lldb/source/Commands/CommandObjectType.cpp
+++ b/lldb/source/Commands/CommandObjectType.cpp
@@ -1758,14 +1758,6 @@ public:
~CommandObjectTypeCategoryDefine() override = default;
- void
- HandleArgumentCompletion(CompletionRequest &request,
- OptionElementVector &opt_element_vector) override {
- lldb_private::CommandCompletions::InvokeCommonCompletionCallbacks(
- GetCommandInterpreter(), lldb::eTypeCategoryNameCompletion, request,
- nullptr);
- }
-
protected:
void DoExecute(Args &command, CommandReturnObject &result) override {
const size_t argc = command.GetArgumentCount();
@@ -1859,14 +1851,6 @@ public:
~CommandObjectTypeCategoryEnable() override = default;
- void
- HandleArgumentCompletion(CompletionRequest &request,
- OptionElementVector &opt_element_vector) override {
- lldb_private::CommandCompletions::InvokeCommonCompletionCallbacks(
- GetCommandInterpreter(), lldb::eTypeCategoryNameCompletion, request,
- nullptr);
- }
-
protected:
void DoExecute(Args &command, CommandReturnObject &result) override {
const size_t argc = command.GetArgumentCount();
@@ -1926,14 +1910,6 @@ public:
~CommandObjectTypeCategoryDelete() override = default;
- void
- HandleArgumentCompletion(CompletionRequest &request,
- OptionElementVector &opt_element_vector) override {
- lldb_private::CommandCompletions::InvokeCommonCompletionCallbacks(
- GetCommandInterpreter(), lldb::eTypeCategoryNameCompletion, request,
- nullptr);
- }
-
protected:
void DoExecute(Args &command, CommandReturnObject &result) override {
const size_t argc = command.GetArgumentCount();
@@ -2033,14 +2009,6 @@ public:
~CommandObjectTypeCategoryDisable() override = default;
- void
- HandleArgumentCompletion(CompletionRequest &request,
- OptionElementVector &opt_element_vector) override {
- lldb_private::CommandCompletions::InvokeCommonCompletionCallbacks(
- GetCommandInterpreter(), lldb::eTypeCategoryNameCompletion, request,
- nullptr);
- }
-
protected:
void DoExecute(Args &command, CommandReturnObject &result) override {
const size_t argc = command.GetArgumentCount();
diff --git a/lldb/source/Commands/CommandObjectWatchpoint.cpp b/lldb/source/Commands/CommandObjectWatchpoint.cpp
index 438a16c..5b74b1a 100644
--- a/lldb/source/Commands/CommandObjectWatchpoint.cpp
+++ b/lldb/source/Commands/CommandObjectWatchpoint.cpp
@@ -831,16 +831,6 @@ 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;
- lldb_private::CommandCompletions::InvokeCommonCompletionCallbacks(
- GetCommandInterpreter(), lldb::eVariablePathCompletion, request,
- nullptr);
- }
-
Options *GetOptions() override { return &m_option_group; }
protected: