diff options
Diffstat (limited to 'lldb/source/Core/ValueObject.cpp')
-rw-r--r-- | lldb/source/Core/ValueObject.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp index c9310753d96..fce00f6d4f3 100644 --- a/lldb/source/Core/ValueObject.cpp +++ b/lldb/source/Core/ValueObject.cpp @@ -331,12 +331,17 @@ ValueObject::GetValue() const bool ValueObject::ResolveValue (Scalar &scalar) { - ExecutionContext exe_ctx; - ExecutionContextScope *exe_scope = GetExecutionContextScope(); - if (exe_scope) - exe_scope->CalculateExecutionContext(exe_ctx); - scalar = m_value.ResolveValue(&exe_ctx, GetClangAST ()); - return scalar.IsValid(); + if (UpdateValueIfNeeded(false)) // make sure that you are up to date before returning anything + { + ExecutionContext exe_ctx; + ExecutionContextScope *exe_scope = GetExecutionContextScope(); + if (exe_scope) + exe_scope->CalculateExecutionContext(exe_ctx); + scalar = m_value.ResolveValue(&exe_ctx, GetClangAST ()); + return scalar.IsValid(); + } + else + return false; } bool |