summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/ModuleList.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2010-12-06 23:51:26 +0000
committerGreg Clayton <gclayton@apple.com>2010-12-06 23:51:26 +0000
commita4d7830017bf6b6ff6be795b380f3f4c6afb7647 (patch)
treee682e948abb5e873edb48f1b574c10123e0ac4e9 /lldb/source/Core/ModuleList.cpp
parent3f4dc2a8a64d33b821b36716f1ec28c4a4a29b8b (diff)
downloadbcm5719-llvm-a4d7830017bf6b6ff6be795b380f3f4c6afb7647.tar.gz
bcm5719-llvm-a4d7830017bf6b6ff6be795b380f3f4c6afb7647.zip
When shared libraries are unloaded, they are now removed from the target
ModuleList so they don't show up in the images. Breakpoint locations that are in shared libraries that get unloaded will persist though so that if you have plug-ins that load/unload and you have a breakpoint set on functions in the plug-ins, the hit counts will persist between loads/unloads. llvm-svn: 121069
Diffstat (limited to 'lldb/source/Core/ModuleList.cpp')
-rw-r--r--lldb/source/Core/ModuleList.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/lldb/source/Core/ModuleList.cpp b/lldb/source/Core/ModuleList.cpp
index d1c640e898e..cf408687616 100644
--- a/lldb/source/Core/ModuleList.cpp
+++ b/lldb/source/Core/ModuleList.cpp
@@ -97,6 +97,20 @@ ModuleList::Remove (ModuleSP &module_sp)
return false;
}
+size_t
+ModuleList::Remove (ModuleList &module_list)
+{
+ Mutex::Locker locker(m_modules_mutex);
+ size_t num_removed = 0;
+ collection::iterator pos, end = module_list.m_modules.end();
+ for (pos = module_list.m_modules.begin(); pos != end; ++pos)
+ {
+ if (Remove (*pos))
+ ++num_removed;
+ }
+ return num_removed;
+}
+
void
OpenPOWER on IntegriCloud