summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectWatchpoint.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Commands/CommandObjectWatchpoint.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectWatchpoint.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lldb/source/Commands/CommandObjectWatchpoint.cpp b/lldb/source/Commands/CommandObjectWatchpoint.cpp
index 6e59a26c473..44dfb29b19b 100644
--- a/lldb/source/Commands/CommandObjectWatchpoint.cpp
+++ b/lldb/source/Commands/CommandObjectWatchpoint.cpp
@@ -785,12 +785,12 @@ corresponding to the byte size of the data type.");
protected:
static size_t GetVariableCallback(void *baton, const char *name,
VariableList &variable_list) {
+ size_t old_size = variable_list.GetSize();
Target *target = static_cast<Target *>(baton);
- if (target) {
- return target->GetImages().FindGlobalVariables(ConstString(name),
- UINT32_MAX, variable_list);
- }
- return 0;
+ if (target)
+ target->GetImages().FindGlobalVariables(ConstString(name), UINT32_MAX,
+ variable_list);
+ return variable_list.GetSize() - old_size;
}
bool DoExecute(Args &command, CommandReturnObject &result) override {
OpenPOWER on IntegriCloud