summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/ModuleList.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Core/ModuleList.cpp')
-rw-r--r--lldb/source/Core/ModuleList.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/lldb/source/Core/ModuleList.cpp b/lldb/source/Core/ModuleList.cpp
index 8f852d4d8d1..157dafa7a2c 100644
--- a/lldb/source/Core/ModuleList.cpp
+++ b/lldb/source/Core/ModuleList.cpp
@@ -201,6 +201,12 @@ Module*
ModuleList::GetModulePointerAtIndex (uint32_t idx) const
{
Mutex::Locker locker(m_modules_mutex);
+ return GetModulePointerAtIndexUnlocked(idx);
+}
+
+Module*
+ModuleList::GetModulePointerAtIndexUnlocked (uint32_t idx) const
+{
if (idx < m_modules.size())
return m_modules[idx].get();
return NULL;
@@ -210,6 +216,12 @@ ModuleSP
ModuleList::GetModuleAtIndex(uint32_t idx)
{
Mutex::Locker locker(m_modules_mutex);
+ return GetModuleAtIndexUnlocked(idx);
+}
+
+ModuleSP
+ModuleList::GetModuleAtIndexUnlocked(uint32_t idx)
+{
ModuleSP module_sp;
if (idx < m_modules.size())
module_sp = m_modules[idx];
OpenPOWER on IntegriCloud