summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp2
-rw-r--r--lldb/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.h1
-rw-r--r--lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp1
-rw-r--r--lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.h1
-rw-r--r--lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp1
-rw-r--r--lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.h1
-rw-r--r--lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp1
-rw-r--r--lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.h1
8 files changed, 8 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp
index 8eb1a124d93..15d7e0c213d 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp
@@ -263,7 +263,7 @@ EnumerateDirectoryCallback(void *baton, FileSpec::FileType file_type,
}
const char *PlatformAppleWatchSimulator::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) {
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.h b/lldb/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.h
index d1b4ee581a0..2b15611df47 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.h
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.h
@@ -86,6 +86,7 @@ public:
}
protected:
+ std::mutex m_sdk_dir_mutex;
std::string m_sdk_directory;
std::string m_build_update;
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp
index d62412f79cb..5b09da24504 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp
@@ -258,6 +258,7 @@ PlatformRemoteAppleTV::GetContainedFilesIntoVectorOfStringsCallback(
bool PlatformRemoteAppleTV::UpdateSDKDirectoryInfosIfNeeded() {
Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST);
+ std::lock_guard<std::mutex> guard(m_sdk_dir_mutex);
if (m_sdk_directory_infos.empty()) {
const char *device_support_dir = GetDeviceSupportDirectory();
if (log) {
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.h b/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.h
index 2090e6a4261..388ea578d06 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.h
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.h
@@ -96,6 +96,7 @@ protected:
bool user_cached;
};
typedef std::vector<SDKDirectoryInfo> SDKDirectoryInfoCollection;
+ std::mutex m_sdk_dir_mutex;
SDKDirectoryInfoCollection m_sdk_directory_infos;
std::string m_device_support_directory;
std::string m_device_support_directory_for_os_version;
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp
index b64aa62591f..c3e9ac52124 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp
@@ -268,6 +268,7 @@ PlatformRemoteAppleWatch::GetContainedFilesIntoVectorOfStringsCallback(
bool PlatformRemoteAppleWatch::UpdateSDKDirectoryInfosIfNeeded() {
Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST);
+ std::lock_guard<std::mutex> guard(m_sdk_dir_mutex);
if (m_sdk_directory_infos.empty()) {
const char *device_support_dir = GetDeviceSupportDirectory();
if (log) {
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.h b/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.h
index d084a5186a3..0b388af329a 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.h
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.h
@@ -98,6 +98,7 @@ protected:
bool user_cached;
};
typedef std::vector<SDKDirectoryInfo> SDKDirectoryInfoCollection;
+ std::mutex m_sdk_dir_mutex;
SDKDirectoryInfoCollection m_sdk_directory_infos;
std::string m_device_support_directory;
std::string m_device_support_directory_for_os_version;
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
index 0553b1b0e3a..ec888511709 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
@@ -263,6 +263,7 @@ PlatformRemoteiOS::GetContainedFilesIntoVectorOfStringsCallback(
bool PlatformRemoteiOS::UpdateSDKDirectoryInfosIfNeeded() {
Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST);
+ std::lock_guard<std::mutex> guard(m_sdk_dir_mutex);
if (m_sdk_directory_infos.empty()) {
// A --sysroot option was supplied - add it to our list of SDKs to check
if (m_sdk_sysroot) {
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.h b/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.h
index 7b7f27c276f..4d88a9e4103 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.h
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.h
@@ -94,6 +94,7 @@ protected:
typedef std::vector<SDKDirectoryInfo> SDKDirectoryInfoCollection;
+ std::mutex m_sdk_dir_mutex;
SDKDirectoryInfoCollection m_sdk_directory_infos;
std::string m_device_support_directory;
std::string m_device_support_directory_for_os_version;
OpenPOWER on IntegriCloud