summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/lldb/source/Target/SectionLoadList.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/tools/lldb/source/Target/SectionLoadList.cpp')
-rw-r--r--contrib/llvm/tools/lldb/source/Target/SectionLoadList.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/contrib/llvm/tools/lldb/source/Target/SectionLoadList.cpp b/contrib/llvm/tools/lldb/source/Target/SectionLoadList.cpp
index 96713c6..82f52f9 100644
--- a/contrib/llvm/tools/lldb/source/Target/SectionLoadList.cpp
+++ b/contrib/llvm/tools/lldb/source/Target/SectionLoadList.cpp
@@ -25,6 +25,25 @@ using namespace lldb;
using namespace lldb_private;
+SectionLoadList::SectionLoadList (const SectionLoadList& rhs) :
+ m_addr_to_sect(),
+ m_sect_to_addr(),
+ m_mutex (Mutex::eMutexTypeRecursive)
+{
+ Mutex::Locker locker(rhs.m_mutex);
+ m_addr_to_sect = rhs.m_addr_to_sect;
+ m_sect_to_addr = rhs.m_sect_to_addr;
+}
+
+void
+SectionLoadList::operator=(const SectionLoadList &rhs)
+{
+ Mutex::Locker lhs_locker (m_mutex);
+ Mutex::Locker rhs_locker (rhs.m_mutex);
+ m_addr_to_sect = rhs.m_addr_to_sect;
+ m_sect_to_addr = rhs.m_sect_to_addr;
+}
+
bool
SectionLoadList::IsEmpty() const
{
OpenPOWER on IntegriCloud