[Lldb-commits] [lldb] r193204 - Improvements to the ValueObjectPrinter to behave correctly in more dynamic value cases
Enrico Granata
egranata at apple.com
Tue Oct 22 15:42:15 PDT 2013
Author: enrico
Date: Tue Oct 22 17:42:14 2013
New Revision: 193204
URL: http://llvm.org/viewvc/llvm-project?rev=193204&view=rev
Log:
Improvements to the ValueObjectPrinter to behave correctly in more dynamic value cases
Modified:
lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp
Modified: lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp?rev=193204&r1=193203&r2=193204&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp (original)
+++ lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp Tue Oct 22 17:42:14 2013
@@ -99,17 +99,38 @@ ValueObjectPrinter::GetDynamicValueIfNee
return true;
bool update_success = m_orig_valobj->UpdateValueIfNeeded (true);
if (!update_success)
- return false;
- if (options.m_use_dynamic != eNoDynamicValues)
{
- ValueObject *dynamic_value = m_orig_valobj->GetDynamicValue(options.m_use_dynamic).get();
- if (dynamic_value)
- m_valobj = dynamic_value;
- else
- m_valobj = m_orig_valobj;
+ m_valobj = m_orig_valobj;
}
else
- m_valobj = m_orig_valobj;
+ {
+ if (m_orig_valobj->IsDynamic())
+ {
+ if (options.m_use_dynamic == eNoDynamicValues)
+ {
+ ValueObject *static_value = m_orig_valobj->GetStaticValue().get();
+ if (static_value)
+ m_valobj = static_value;
+ else
+ m_valobj = m_orig_valobj;
+ }
+ else
+ m_valobj = m_orig_valobj;
+ }
+ else
+ {
+ if (options.m_use_dynamic != eNoDynamicValues)
+ {
+ ValueObject *dynamic_value = m_orig_valobj->GetDynamicValue(options.m_use_dynamic).get();
+ if (dynamic_value)
+ m_valobj = dynamic_value;
+ else
+ m_valobj = m_orig_valobj;
+ }
+ else
+ m_valobj = m_orig_valobj;
+ }
+ }
m_clang_type = m_valobj->GetClangType();
m_type_flags = m_clang_type.GetTypeInfo ();
return true;
More information about the lldb-commits
mailing list