diff --git a/lldb/source/Breakpoint/BreakpointResolverName.cpp b/lldb/source/Breakpoint/BreakpointResolverName.cpp index 264638eb836dc6..77ddd86302cd1d 100644 --- a/lldb/source/Breakpoint/BreakpointResolverName.cpp +++ b/lldb/source/Breakpoint/BreakpointResolverName.cpp @@ -24,10 +24,10 @@ using namespace lldb; using namespace lldb_private; -BreakpointResolverName::BreakpointResolverName(const BreakpointSP &bkpt, - const char *name_cstr, FunctionNameType name_type_mask, - LanguageType language, Breakpoint::MatchType type, lldb::addr_t offset, - bool skip_prologue) +BreakpointResolverName::BreakpointResolverName( + const BreakpointSP &bkpt, const char *name_cstr, + FunctionNameType name_type_mask, LanguageType language, + Breakpoint::MatchType type, lldb::addr_t offset, bool skip_prologue) : BreakpointResolver(bkpt, BreakpointResolver::NameResolver, offset), m_match_type(type), m_language(language), m_skip_prologue(skip_prologue) { if (m_match_type == Breakpoint::Regexp) { @@ -237,9 +237,9 @@ void BreakpointResolverName::AddNameLookup(ConstString name, if (Language *lang = Language::FindPlugin(m_language)) { add_variant_funcs(lang); } else { - // Most likely m_language is eLanguageTypeUnknown. We check each language for - // possible variants or more qualified names and create lookups for those as - // well. + // Most likely m_language is eLanguageTypeUnknown. We check each language + // for possible variants or more qualified names and create lookups for + // those as well. Language::ForEach(add_variant_funcs); } } diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp index 88cc957e91fac4..29b419e9969743 100644 --- a/lldb/source/Core/Module.cpp +++ b/lldb/source/Core/Module.cpp @@ -797,6 +797,10 @@ void Module::LookupInfo::Prune(SymbolContextList &sc_list, while (i < sc_list.GetSize()) { if (!sc_list.GetContextAtIndex(i, sc)) break; + if (!lldb_private::Language::LanguageIsCFamily(sc.GetLanguage())) { + ++i; + continue; + } // Make sure the mangled and demangled names don't match before we try to // pull anything out ConstString mangled_name(sc.GetFunctionName(Mangled::ePreferMangled)); diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFIndex.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFIndex.cpp index eafddbad03f57b..7bf53dce1b1b07 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFIndex.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFIndex.cpp @@ -59,7 +59,8 @@ bool DWARFIndex::ProcessFunctionDIE( return true; // In case of a full match, we just insert everything we find. - if (name_type_mask & eFunctionNameTypeFull && die.GetMangledName() == name) + if (name_type_mask & eFunctionNameTypeFull && + (die.GetMangledName() == name || die.GetName() == name)) return callback(die); // If looking for ObjC selectors, we need to also check if the name is a