[Lldb-commits] [PATCH] Fix ValueObject::GetValueDidChange; Improve test for it
Greg Clayton
clayborg at gmail.com
Fri Mar 6 13:24:52 PST 2015
Fix the test case as noted in inline comment.
================
Comment at: include/lldb/Core/ValueObjectVariable.h:85-88
@@ -84,2 +84,6 @@
ValueObjectVariable (ExecutionContextScope *exe_scope, const lldb::VariableSP &var_sp);
+
+ static void
+ UpdateValueObjectAndChildren(lldb::ValueObjectSP &valobj_sp);
+
//------------------------------------------------------------------
----------------
Remove this.
================
Comment at: source/Core/ValueObjectVariable.cpp:41-59
@@ -40,3 +40,21 @@
{
- return (new ValueObjectVariable (exe_scope, var_sp))->GetSP();
+ lldb::ValueObjectSP valobj_sp((new ValueObjectVariable (exe_scope, var_sp))->GetSP());
+ UpdateValueObjectAndChildren(valobj_sp);
+ return valobj_sp;
+}
+
+void
+ValueObjectVariable::UpdateValueObjectAndChildren(lldb::ValueObjectSP &valobj_sp)
+{
+ valobj_sp->UpdateValueIfNeeded();
+
+ if (!valobj_sp->IsPointerOrReferenceType())
+ {
+ const size_t valobj_child_num = valobj_sp->GetNumChildren();
+ for (size_t i = 0; i < valobj_child_num; ++i)
+ {
+ lldb::ValueObjectSP child = valobj_sp->GetChildAtIndex(i, true);
+ UpdateValueObjectAndChildren(child);
+ }
+ }
}
----------------
revert this.
http://reviews.llvm.org/D8103
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the lldb-commits
mailing list