The LLDB API (lldb::SB*) is now thread safe!



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@122262 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBSymbol.cpp b/source/API/SBSymbol.cpp
index 4c8e02c..8f6593c 100644
--- a/source/API/SBSymbol.cpp
+++ b/source/API/SBSymbol.cpp
@@ -120,9 +120,13 @@
     SBInstructionList sb_instructions;
     if (m_opaque_ptr)
     {
+        Mutex::Locker api_locker;
         ExecutionContext exe_ctx;
         if (target.IsValid())
+        {
+            api_locker.Reset (target->GetAPIMutex().GetMutex());
             target->CalculateExecutionContext (exe_ctx);
+        }
         const AddressRange *symbol_range = m_opaque_ptr->GetAddressRangePtr();
         if (symbol_range)
         {