aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/lldb/source/Commands/CommandObjectWatchpoint.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/lldb/source/Commands/CommandObjectWatchpoint.cpp')
-rw-r--r--contrib/llvm-project/lldb/source/Commands/CommandObjectWatchpoint.cpp52
1 files changed, 51 insertions, 1 deletions
diff --git a/contrib/llvm-project/lldb/source/Commands/CommandObjectWatchpoint.cpp b/contrib/llvm-project/lldb/source/Commands/CommandObjectWatchpoint.cpp
index ce4662930a7c..e7b1f31f3960 100644
--- a/contrib/llvm-project/lldb/source/Commands/CommandObjectWatchpoint.cpp
+++ b/contrib/llvm-project/lldb/source/Commands/CommandObjectWatchpoint.cpp
@@ -292,6 +292,14 @@ public:
~CommandObjectWatchpointEnable() override = default;
+ void
+ HandleArgumentCompletion(CompletionRequest &request,
+ OptionElementVector &opt_element_vector) override {
+ CommandCompletions::InvokeCommonCompletionCallbacks(
+ GetCommandInterpreter(), CommandCompletions::eWatchPointIDCompletion,
+ request, nullptr);
+ }
+
protected:
bool DoExecute(Args &command, CommandReturnObject &result) override {
Target *target = &GetSelectedTarget();
@@ -362,6 +370,14 @@ public:
~CommandObjectWatchpointDisable() override = default;
+ void
+ HandleArgumentCompletion(CompletionRequest &request,
+ OptionElementVector &opt_element_vector) override {
+ CommandCompletions::InvokeCommonCompletionCallbacks(
+ GetCommandInterpreter(), CommandCompletions::eWatchPointIDCompletion,
+ request, nullptr);
+ }
+
protected:
bool DoExecute(Args &command, CommandReturnObject &result) override {
Target *target = &GetSelectedTarget();
@@ -439,6 +455,14 @@ public:
~CommandObjectWatchpointDelete() override = default;
+ void
+ HandleArgumentCompletion(CompletionRequest &request,
+ OptionElementVector &opt_element_vector) override {
+ CommandCompletions::InvokeCommonCompletionCallbacks(
+ GetCommandInterpreter(), CommandCompletions::eWatchPointIDCompletion,
+ request, nullptr);
+ }
+
Options *GetOptions() override { return &m_options; }
class CommandOptions : public Options {
@@ -557,6 +581,14 @@ public:
~CommandObjectWatchpointIgnore() override = default;
+ void
+ HandleArgumentCompletion(CompletionRequest &request,
+ OptionElementVector &opt_element_vector) override {
+ CommandCompletions::InvokeCommonCompletionCallbacks(
+ GetCommandInterpreter(), CommandCompletions::eWatchPointIDCompletion,
+ request, nullptr);
+ }
+
Options *GetOptions() override { return &m_options; }
class CommandOptions : public Options {
@@ -677,6 +709,14 @@ public:
~CommandObjectWatchpointModify() override = default;
+ void
+ HandleArgumentCompletion(CompletionRequest &request,
+ OptionElementVector &opt_element_vector) override {
+ CommandCompletions::InvokeCommonCompletionCallbacks(
+ GetCommandInterpreter(), CommandCompletions::eWatchPointIDCompletion,
+ request, nullptr);
+ }
+
Options *GetOptions() override { return &m_options; }
class CommandOptions : public Options {
@@ -823,6 +863,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:
@@ -905,7 +955,7 @@ protected:
// We're in business.
// Find out the size of this variable.
size = m_option_watchpoint.watch_size == 0
- ? valobj_sp->GetByteSize()
+ ? valobj_sp->GetByteSize().getValueOr(0)
: m_option_watchpoint.watch_size;
}
compiler_type = valobj_sp->GetCompilerType();