Author: enrico
Date: Mon Nov  7 10:25:01 2016
New Revision: 286116

URL: http://llvm.org/viewvc/llvm-project?rev=286116&view=rev
Log:
Fix an issue where LLDB would hang trying to launch tvOS simulator binaries


Modified:
    lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp
    lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.h

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp?rev=286116&r1=286115&r2=286116&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp 
(original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp Mon 
Nov  7 10:25:01 2016
@@ -150,7 +150,7 @@ const char *PlatformAppleTVSimulator::Ge
 /// Default Constructor
 //------------------------------------------------------------------
 PlatformAppleTVSimulator::PlatformAppleTVSimulator()
-    : PlatformDarwin(true), m_sdk_directory() {}
+    : PlatformDarwin(true), m_sdk_dir_mutex(), m_sdk_directory() {}
 
 //------------------------------------------------------------------
 /// Destructor.
@@ -261,7 +261,7 @@ EnumerateDirectoryCallback(void *baton,
 }
 
 const char *PlatformAppleTVSimulator::GetSDKDirectoryAsCString() {
-  std::lock_guard<std::mutex> guard(m_mutex);
+  std::lock_guard<std::mutex> guard(m_sdk_dir_mutex);
   if (m_sdk_directory.empty()) {
     const char *developer_dir = GetDeveloperDirectory();
     if (developer_dir) {

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.h?rev=286116&r1=286115&r2=286116&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.h 
(original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.h Mon 
Nov  7 10:25:01 2016
@@ -86,6 +86,7 @@ public:
   }
 
 protected:
+  std::mutex m_sdk_dir_mutex;
   std::string m_sdk_directory;
   std::string m_build_update;
 


_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to