[Lldb-commits] [lldb] r131762 - /lldb/trunk/source/API/SBValue.cpp

Greg Clayton gclayton at apple.com
Fri May 20 15:07:17 PDT 2011


Author: gclayton
Date: Fri May 20 17:07:17 2011
New Revision: 131762

URL: http://llvm.org/viewvc/llvm-project?rev=131762&view=rev
Log:
Now that we have dynamic values, we need to protect the GetChildAtIndex()
calls with the target API mutex.


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=131762&r1=131761&r2=131762&view=diff
==============================================================================
--- lldb/trunk/source/API/SBValue.cpp (original)
+++ lldb/trunk/source/API/SBValue.cpp Fri May 20 17:07:17 2011
@@ -348,6 +348,9 @@
 {
     lldb::ValueObjectSP child_sp;
 
+    if (m_opaque_sp->GetUpdatePoint().GetTarget())
+        Mutex::Locker api_locker (m_opaque_sp->GetUpdatePoint().GetTarget()->GetAPIMutex());
+
     if (m_opaque_sp)
     {
         child_sp = m_opaque_sp->GetChildAtIndex (idx, true);
@@ -401,6 +404,10 @@
     lldb::ValueObjectSP child_sp;
     const ConstString str_name (name);
 
+    if (m_opaque_sp->GetUpdatePoint().GetTarget())
+        Mutex::Locker api_locker (m_opaque_sp->GetUpdatePoint().GetTarget()->GetAPIMutex());
+    
+
     if (m_opaque_sp)
     {
         child_sp = m_opaque_sp->GetChildMemberWithName (str_name, true);





More information about the lldb-commits mailing list