summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/ModuleList.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2010-08-03 01:26:16 +0000
committerGreg Clayton <gclayton@apple.com>2010-08-03 01:26:16 +0000
commit3504eee8a8438ca12b69753916d79b93552a3f0b (patch)
tree4ad1b034b2d085d41675f39765d1dd80bc80c157 /lldb/source/Core/ModuleList.cpp
parent4887001f81635bcb2f2bed4220e03a762f1fdc8d (diff)
downloadbcm5719-llvm-3504eee8a8438ca12b69753916d79b93552a3f0b.tar.gz
bcm5719-llvm-3504eee8a8438ca12b69753916d79b93552a3f0b.zip
Added FindTypes to Module and ModuleList.
llvm-svn: 110093
Diffstat (limited to 'lldb/source/Core/ModuleList.cpp')
-rw-r--r--lldb/source/Core/ModuleList.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/lldb/source/Core/ModuleList.cpp b/lldb/source/Core/ModuleList.cpp
index 1c974c87120..37357c373ca 100644
--- a/lldb/source/Core/ModuleList.cpp
+++ b/lldb/source/Core/ModuleList.cpp
@@ -290,6 +290,28 @@ ModuleList::FindModule (lldb_private::Module *module_ptr)
}
+uint32_t
+ModuleList::FindTypes (const SymbolContext& sc, const ConstString &name, bool append, uint32_t max_matches, TypeList& types)
+{
+ Mutex::Locker locker(m_modules_mutex);
+
+ if (!append)
+ types.Clear();
+
+ uint32_t total_matches = 0;
+ collection::const_iterator pos, end = m_modules.end();
+ for (pos = m_modules.begin(); pos != end; ++pos)
+ {
+ if (sc.module_sp.get() == NULL || sc.module_sp.get() == (*pos).get())
+ total_matches += (*pos)->FindTypes (sc, name, true, max_matches, types);
+
+ if (total_matches >= max_matches)
+ break;
+ }
+ return total_matches;
+}
+
+
ModuleSP
ModuleList::FindFirstModuleForFileSpec (const FileSpec &file_spec, const ConstString *object_name)
{
OpenPOWER on IntegriCloud