Make sure SectionLoadHistory::GetCurrentSectionLoadList () is thread safe.
<rdar://problem/15818525>
llvm-svn: 209485
diff --git a/lldb/source/Target/SectionLoadHistory.cpp b/lldb/source/Target/SectionLoadHistory.cpp
index 527614e..1e5ade7 100644
--- a/lldb/source/Target/SectionLoadHistory.cpp
+++ b/lldb/source/Target/SectionLoadHistory.cpp
@@ -108,6 +108,7 @@
SectionLoadHistory::GetCurrentSectionLoadList ()
{
const bool read_only = true;
+ Mutex::Locker locker(m_mutex);
SectionLoadList *section_load_list = GetSectionLoadListForStopID (eStopIDNow, read_only);
assert(section_load_list != NULL);
return *section_load_list;