[Lldb-commits] [lldb] r214341 - When resetting the number of children on a ValueObject, also clear the existing children. This avoids issues where dynamic types change, but children stay the same

Enrico Granata egranata at apple.com
Wed Jul 30 14:23:55 PDT 2014


Author: enrico
Date: Wed Jul 30 16:23:55 2014
New Revision: 214341

URL: http://llvm.org/viewvc/llvm-project?rev=214341&view=rev
Log:
When resetting the number of children on a ValueObject, also clear the existing children. This avoids issues where dynamic types change, but children stay the same

Modified:
    lldb/trunk/include/lldb/Core/ValueObject.h

Modified: lldb/trunk/include/lldb/Core/ValueObject.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObject.h?rev=214341&r1=214340&r2=214341&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObject.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObject.h Wed Jul 30 16:23:55 2014
@@ -968,7 +968,7 @@ protected:
         void
         SetChildrenCount (size_t count)
         {
-            m_children_count = count;
+            Clear(count);
         }
         
         size_t
@@ -978,10 +978,10 @@ protected:
         }
         
         void
-        Clear()
+        Clear(size_t new_count = 0)
         {
-            m_children_count = 0;
             Mutex::Locker locker(m_mutex);
+            m_children_count = new_count;
             m_children.clear();
         }
         





More information about the lldb-commits mailing list