[Lldb-commits] [lldb] r205928 - <rdar://problem/16477472>

Enrico Granata egranata at apple.com
Wed Apr 9 14:06:11 PDT 2014

Author: enrico
Date: Wed Apr  9 16:06:11 2014
New Revision: 205928

URL: http://llvm.org/viewvc/llvm-project?rev=205928&view=rev

Set the correct FormatManager revision before starting to figure out the new formatters
This can avoid entering some corner cases where as part of figuring out formatters we try to figure out dynamic types, and in turn that causes us to go back in trying to fetch new formatters - it is not only a futile exercise, it's also prone to endless recursion

This would only cause a behavior change if getting this chain started would eventually cause something to run and alter the formatters, a very unlikely if at all possible sequence of events


Modified: lldb/trunk/source/Core/ValueObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObject.cpp?rev=205928&r1=205927&r2=205928&view=diff
--- lldb/trunk/source/Core/ValueObject.cpp (original)
+++ lldb/trunk/source/Core/ValueObject.cpp Wed Apr  9 16:06:11 2014
@@ -245,15 +245,14 @@ ValueObject::UpdateFormatsIfNeeded()
     if ( (m_last_format_mgr_revision != DataVisualization::GetCurrentRevision()))
+        m_last_format_mgr_revision = DataVisualization::GetCurrentRevision();
+        any_change = true;
         SetValueFormat(DataVisualization::GetFormat (*this, eNoDynamicValues));
         SetSummaryFormat(DataVisualization::GetSummaryFormat (*this, GetDynamicValueType()));
         SetSyntheticChildren(DataVisualization::GetSyntheticChildren (*this, GetDynamicValueType()));
-        m_last_format_mgr_revision = DataVisualization::GetCurrentRevision();
-        any_change = true;
     return any_change;

More information about the lldb-commits mailing list