summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/ModuleList.cpp
diff options
context:
space:
mode:
authorCarlo Kok <ck@remobjects.com>2014-09-19 19:38:19 +0000
committerCarlo Kok <ck@remobjects.com>2014-09-19 19:38:19 +0000
commit0fd6fd4fd45be23c885f6fa0654c780773ce9517 (patch)
treec3dac23c0b930778d660f4ff96a0abdac6f2adc4 /lldb/source/Core/ModuleList.cpp
parent5a6edad3d8c09c6fc6122bf048da81028a7e994c (diff)
downloadbcm5719-llvm-0fd6fd4fd45be23c885f6fa0654c780773ce9517.tar.gz
bcm5719-llvm-0fd6fd4fd45be23c885f6fa0654c780773ce9517.zip
Adds two new functions to SBTarget FindGlobalVariables and FindGlobalFunctions that lets you search by name, by regular expression and by starts with.
llvm-svn: 218140
Diffstat (limited to 'lldb/source/Core/ModuleList.cpp')
-rw-r--r--lldb/source/Core/ModuleList.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/lldb/source/Core/ModuleList.cpp b/lldb/source/Core/ModuleList.cpp
index 156f3cf9d0a..879eb9bd182 100644
--- a/lldb/source/Core/ModuleList.cpp
+++ b/lldb/source/Core/ModuleList.cpp
@@ -484,6 +484,26 @@ ModuleList::FindFunctionSymbols (const ConstString &name,
return sc_list.GetSize() - old_size;
}
+
+size_t
+ModuleList::FindFunctions(const RegularExpression &name,
+ bool include_symbols,
+ bool include_inlines,
+ bool append,
+ SymbolContextList& sc_list)
+{
+ const size_t old_size = sc_list.GetSize();
+
+ Mutex::Locker locker(m_modules_mutex);
+ collection::const_iterator pos, end = m_modules.end();
+ for (pos = m_modules.begin(); pos != end; ++pos)
+ {
+ (*pos)->FindFunctions (name, include_symbols, include_inlines, append, sc_list);
+ }
+
+ return sc_list.GetSize() - old_size;
+}
+
size_t
ModuleList::FindCompileUnits (const FileSpec &path,
bool append,
OpenPOWER on IntegriCloud