diff options
| author | Greg Clayton <gclayton@apple.com> | 2010-08-17 00:35:34 +0000 | 
|---|---|---|
| committer | Greg Clayton <gclayton@apple.com> | 2010-08-17 00:35:34 +0000 | 
| commit | 57a6b999af13a3d12db3db2dfeb0894605f7799c (patch) | |
| tree | 42164c90259ded3908963a7d4bde17dfcb54ed15 | |
| parent | b962ca0ce562cc129f0c19cb64025fc3d18cdd9d (diff) | |
| download | bcm5719-llvm-57a6b999af13a3d12db3db2dfeb0894605f7799c.tar.gz bcm5719-llvm-57a6b999af13a3d12db3db2dfeb0894605f7799c.zip | |
Fixed FindFunctions so it works with all the new name types for the DWARF in object files case.
llvm-svn: 111215
| -rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp | 35 | 
1 files changed, 18 insertions, 17 deletions
| diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp index 0507437c8a1..22b08c68c95 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<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 (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;  } | 

