[Lldb-commits] [lldb] r111215 - /lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
Greg Clayton
gclayton at apple.com
Mon Aug 16 17:35:34 PDT 2010
Author: gclayton
Date: Mon Aug 16 19:35:34 2010
New Revision: 111215
URL: http://llvm.org/viewvc/llvm-project?rev=111215&view=rev
Log:
Fixed FindFunctions so it works with all the new name types for the DWARF in object files case.
Modified:
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp?rev=111215&r1=111214&r2=111215&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp Mon Aug 16 19:35:34 2010
@@ -769,30 +769,17 @@
"SymbolFileDWARFDebugMap::FindFunctions (name = %s)",
name.GetCString());
-
- std::vector<uint32_t> 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; i<match_count; ++i)
- {
- uint32_t oso_idx;
- CompileUnitInfo* comp_unit_info = GetCompileUnitInfoForSymbolWithIndex (indexes[i], &oso_idx);
- if (comp_unit_info)
- {
- SymbolFileDWARF *oso_dwarf = GetSymbolFileByOSOIndex (oso_idx);
- if (oso_dwarf)
- oso_dwarf->FindFunctions(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 (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;
}
More information about the lldb-commits
mailing list