diff options
Diffstat (limited to 'lldb/source/Core/Module.cpp')
| -rw-r--r-- | lldb/source/Core/Module.cpp | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp index 88cc957e91fa..0cc21c61a3df 100644 --- a/lldb/source/Core/Module.cpp +++ b/lldb/source/Core/Module.cpp @@ -787,40 +787,16 @@ void Module::LookupInfo::Prune(SymbolContextList &sc_list, } } - // If we have only full name matches we might have tried to set breakpoint on - // "func" and specified eFunctionNameTypeFull, but we might have found - // "a::func()", "a::b::func()", "c::func()", "func()" and "func". Only - // "func()" and "func" should end up matching. if (m_name_type_mask == eFunctionNameTypeFull) { SymbolContext sc; size_t i = start_idx; while (i < sc_list.GetSize()) { if (!sc_list.GetContextAtIndex(i, sc)) break; - // Make sure the mangled and demangled names don't match before we try to - // pull anything out - ConstString mangled_name(sc.GetFunctionName(Mangled::ePreferMangled)); - ConstString full_name(sc.GetFunctionName()); - if (mangled_name != m_name && full_name != m_name) { - CPlusPlusLanguage::MethodName cpp_method(full_name); - if (cpp_method.IsValid()) { - if (cpp_method.GetContext().empty()) { - if (cpp_method.GetBasename().compare(m_name) != 0) { - sc_list.RemoveContextAtIndex(i); - continue; - } - } else { - std::string qualified_name; - llvm::StringRef anon_prefix("(anonymous namespace)"); - if (cpp_method.GetContext() == anon_prefix) - qualified_name = cpp_method.GetBasename().str(); - else - qualified_name = cpp_method.GetScopeQualifiedName(); - if (qualified_name != m_name.GetCString()) { - sc_list.RemoveContextAtIndex(i); - continue; - } - } + if (Language *languagePlugin = Language::FindPlugin(sc.GetLanguage())) { + if (languagePlugin->SymbolLookupHookShouldPruneResult(sc, *this)) { + sc_list.RemoveContextAtIndex(i); + continue; } } ++i; |
