[Lldb-commits] [lldb] r178734 - The SBValue impl class's GetSP can now fetch the dynamic type or the synthetic

Jim Ingham jingham at apple.com
Wed Apr 3 19:23:41 PDT 2013


Author: jingham
Date: Wed Apr  3 21:23:41 2013
New Revision: 178734

URL: http://llvm.org/viewvc/llvm-project?rev=178734&view=rev
Log:
The SBValue impl class's GetSP can now fetch the dynamic type or the synthetic
children - which it may have to compute.  Thus it needs to take the API lock.

<rdar://problem/13560869>

Modified:
    lldb/trunk/source/API/SBValue.cpp

Modified: lldb/trunk/source/API/SBValue.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBValue.cpp?rev=178734&r1=178733&r2=178734&view=diff
==============================================================================
--- lldb/trunk/source/API/SBValue.cpp (original)
+++ lldb/trunk/source/API/SBValue.cpp Wed Apr  3 21:23:41 2013
@@ -106,6 +106,12 @@ namespace {
             if (!m_opaque_sp)
                 return m_opaque_sp;
             lldb::ValueObjectSP value_sp = m_opaque_sp;
+            
+            Mutex::Locker api_lock;
+            Target *target = value_sp->GetTargetSP().get();
+            if (target)
+                api_lock.Lock(target->GetAPIMutex());
+            
             if (value_sp->GetDynamicValue(m_use_dynamic))
                 value_sp = value_sp->GetDynamicValue(m_use_dynamic);
             if (value_sp->GetSyntheticValue(m_use_synthetic))





More information about the lldb-commits mailing list