From 3aef968ec3faada22319aaa3530776974082d2d5 Mon Sep 17 00:00:00 2001 From: Augusto Noronha Date: Fri, 29 Jul 2022 15:19:17 -0700 Subject: [lldb] Allow SymbolTable regex search functions to match mangled name It may be useful to search symbol table entries by mangled instead of demangled names. Add this optional functionality in the SymbolTable functions. Differential Revision: https://reviews.llvm.org/D130803 --- lldb/source/Core/Module.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lldb/source/Core/Module.cpp') diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp index 893e20837124..0d4466a13d25 100644 --- a/lldb/source/Core/Module.cpp +++ b/lldb/source/Core/Module.cpp @@ -1367,9 +1367,9 @@ void Module::FindSymbolsWithNameAndType(ConstString name, } } -void Module::FindSymbolsMatchingRegExAndType(const RegularExpression ®ex, - SymbolType symbol_type, - SymbolContextList &sc_list) { +void Module::FindSymbolsMatchingRegExAndType( + const RegularExpression ®ex, SymbolType symbol_type, + SymbolContextList &sc_list, Mangled::NamePreference mangling_preference) { // No need to protect this call using m_mutex all other method calls are // already thread safe. LLDB_SCOPED_TIMERF( @@ -1379,7 +1379,7 @@ void Module::FindSymbolsMatchingRegExAndType(const RegularExpression ®ex, std::vector symbol_indexes; symtab->FindAllSymbolsMatchingRexExAndType( regex, symbol_type, Symtab::eDebugAny, Symtab::eVisibilityAny, - symbol_indexes); + symbol_indexes, mangling_preference); SymbolIndicesToSymbolContextList(symtab, symbol_indexes, sc_list); } } -- cgit v1.2.3