diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp index 0507437c8a17..22b08c68c952 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp @@ -769,30 +769,17 @@ SymbolFileDWARFDebugMap::FindFunctions(const ConstString &name, uint32_t name_ty "SymbolFileDWARFDebugMap::FindFunctions (name = %s)", name.GetCString()); - - std::vector indexes; uint32_t initial_size = 0; if (append) initial_size = sc_list.GetSize(); else sc_list.Clear(); - const size_t match_count = m_obj_file->GetSymtab()->FindAllSymbolsWithNameAndType (name, eSymbolTypeFunction, indexes); - if (match_count > 0) + uint32_t oso_idx = 0; + SymbolFileDWARF *oso_dwarf; + while ((oso_dwarf = GetSymbolFileByOSOIndex (oso_idx++)) != NULL) { - for (size_t i=0; iFindFunctions(name, name_type_mask, true, sc_list); - } - } -// Stream s(stdout); -// sc_list.Dump(&s); + oso_dwarf->FindFunctions(name, name_type_mask, true, sc_list); } return sc_list.GetSize() - initial_size; @@ -806,6 +793,20 @@ SymbolFileDWARFDebugMap::FindFunctions (const RegularExpression& regex, bool app "SymbolFileDWARFDebugMap::FindFunctions (regex = '%s')", regex.GetText()); + uint32_t initial_size = 0; + if (append) + initial_size = sc_list.GetSize(); + else + sc_list.Clear(); + + uint32_t oso_idx = 0; + SymbolFileDWARF *oso_dwarf; + while ((oso_dwarf = GetSymbolFileByOSOIndex (oso_idx++)) != NULL) + { + oso_dwarf->FindFunctions(regex, true, sc_list); + } + + return sc_list.GetSize() - initial_size; return 0; }