Fix up how the ValueObjects manage their life cycle so that you can hand out a shared
pointer to a ValueObject or any of its dependent ValueObjects, and the whole cluster will
stay around as long as that shared pointer stays around.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130035 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Target/StackFrame.cpp b/source/Target/StackFrame.cpp
index ec3376d..1c49ca8 100644
--- a/source/Target/StackFrame.cpp
+++ b/source/Target/StackFrame.cpp
@@ -628,7 +628,7 @@
var_path.erase(0, child_name.GetLength());
if (dynamic_value)
{
- ValueObjectSP dynamic_value_sp(child_valobj_sp->GetDynamicValue(true, child_valobj_sp));
+ ValueObjectSP dynamic_value_sp(child_valobj_sp->GetDynamicValue(true));
if (dynamic_value_sp)
child_valobj_sp = dynamic_value_sp;
}
@@ -690,7 +690,7 @@
separator_idx = var_path.find_first_of(".-[");
if (dynamic_value)
{
- ValueObjectSP dynamic_value_sp(child_valobj_sp->GetDynamicValue(true, child_valobj_sp));
+ ValueObjectSP dynamic_value_sp(child_valobj_sp->GetDynamicValue(true));
if (dynamic_value_sp)
child_valobj_sp = dynamic_value_sp;
}
@@ -825,14 +825,14 @@
{
if (m_variable_list_value_objects.GetSize() < num_variables)
m_variable_list_value_objects.Resize(num_variables);
- valobj_sp.reset (new ValueObjectVariable (this, variable_sp));
+ valobj_sp = ValueObjectVariable::Create (this, variable_sp);
m_variable_list_value_objects.SetValueObjectAtIndex (var_idx, valobj_sp);
}
}
}
if (use_dynamic && valobj_sp)
{
- ValueObjectSP dynamic_sp = valobj_sp->GetDynamicValue (true, valobj_sp);
+ ValueObjectSP dynamic_sp = valobj_sp->GetDynamicValue (true);
if (dynamic_sp)
return dynamic_sp;
}