From 0fd6fd4fd45be23c885f6fa0654c780773ce9517 Mon Sep 17 00:00:00 2001 From: Carlo Kok Date: Fri, 19 Sep 2014 19:38:19 +0000 Subject: 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 --- lldb/source/Core/ModuleList.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'lldb/source/Core/ModuleList.cpp') 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, -- cgit v1.2.3