aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectRegister.cpp
diff options
context:
space:
mode:
authorMed Ismail Bennani <ismail@bennani.ma>2023-06-06 10:24:48 -0700
committerMed Ismail Bennani <ismail@bennani.ma>2023-06-06 10:58:34 -0700
commit6a9c3e611505b7637b46fbaacaf50362c97a263d (patch)
treead6cd9ec81eb504e18480d49fd1b616815eaa874 /lldb/source/Commands/CommandObjectRegister.cpp
parent1e82b20118e31bd6c3844a84e03f701997a9b7ed (diff)
downloadllvm-6a9c3e611505b7637b46fbaacaf50362c97a263d.zip
llvm-6a9c3e611505b7637b46fbaacaf50362c97a263d.tar.gz
llvm-6a9c3e611505b7637b46fbaacaf50362c97a263d.tar.bz2
[lldb/Commands] Add support to auto-completion for user commands
This patch should allow the user to set specific auto-completion type for their custom commands. To do so, we had to hoist the `CompletionType` enum so the user can access it and add a new completion type flag to the CommandScriptAdd Command Object. So now, the user can specify which completion type will be used with their custom command, when they register it. This also makes the `crashlog` custom commands use disk-file completion type, to browse through the user file system and load the report. Differential Revision: https://reviews.llvm.org/D152011 Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
Diffstat (limited to 'lldb/source/Commands/CommandObjectRegister.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectRegister.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/lldb/source/Commands/CommandObjectRegister.cpp b/lldb/source/Commands/CommandObjectRegister.cpp
index 7c1155b..c288dbe 100644
--- a/lldb/source/Commands/CommandObjectRegister.cpp
+++ b/lldb/source/Commands/CommandObjectRegister.cpp
@@ -79,9 +79,8 @@ public:
if (!m_exe_ctx.HasProcessScope())
return;
- CommandCompletions::InvokeCommonCompletionCallbacks(
- GetCommandInterpreter(), CommandCompletions::eRegisterCompletion,
- request, nullptr);
+ lldb_private::CommandCompletions::InvokeCommonCompletionCallbacks(
+ GetCommandInterpreter(), lldb::eRegisterCompletion, request, nullptr);
}
Options *GetOptions() override { return &m_option_group; }
@@ -342,9 +341,8 @@ public:
if (!m_exe_ctx.HasProcessScope() || request.GetCursorIndex() != 0)
return;
- CommandCompletions::InvokeCommonCompletionCallbacks(
- GetCommandInterpreter(), CommandCompletions::eRegisterCompletion,
- request, nullptr);
+ lldb_private::CommandCompletions::InvokeCommonCompletionCallbacks(
+ GetCommandInterpreter(), lldb::eRegisterCompletion, request, nullptr);
}
protected: