diff options
4 files changed, 19 insertions, 8 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp index 2f882f7ab58..16368e1621b 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp @@ -571,6 +571,7 @@ DWARFCompileUnit::Index NameToDIE& objc_class_selector_dies, NameToDIE& name_to_global_die, NameToDIE& name_to_type_die, + NameToDIE& name_to_namespace_die, const DWARFDebugRanges *debug_ranges, DWARFDebugAranges *aranges ) @@ -874,13 +875,17 @@ DWARFCompileUnit::Index case DW_TAG_structure_type: case DW_TAG_union_type: case DW_TAG_typedef: - case DW_TAG_namespace: if (name && is_declaration == false) { name_to_type_die.Insert (ConstString(name), die_info); } break; + case DW_TAG_namespace: + if (name) + name_to_namespace_die.Insert (ConstString(name), die_info); + break; + case DW_TAG_variable: if (name && has_location && is_global_or_static_variable) { diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h index dbf8f071e16..48f9dfaff9e 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h @@ -141,6 +141,7 @@ public: NameToDIE& objc_class_selector_dies, NameToDIE& name_to_global_die, NameToDIE& name_to_type_die, + NameToDIE& name_to_namespace_die, const DWARFDebugRanges* debug_ranges, DWARFDebugAranges *aranges); diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp index 8cd8e9d16b5..ae2bd033705 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -163,7 +163,8 @@ SymbolFileDWARF::SymbolFileDWARF(ObjectFile* objfile) : m_function_selector_index(), m_objc_class_selectors_index(), m_global_index(), - m_types_index(), + m_type_index(), + m_namespace_index(), m_indexed(false), m_ranges() { @@ -1718,7 +1719,8 @@ SymbolFileDWARF::Index () m_function_selector_index, m_objc_class_selectors_index, m_global_index, - m_types_index, + m_type_index, + m_namespace_index, DebugRanges(), m_aranges.get()); @@ -1742,7 +1744,9 @@ SymbolFileDWARF::Index () s.Printf("\nFunction selectors:\n"); m_function_selector_index.Dump (&s); s.Printf("\nObjective C class selectors:\n"); m_objc_class_selectors_index.Dump (&s); s.Printf("\nGlobals and statics:\n"); m_global_index.Dump (&s); - s.Printf("\nTypes:\n"); m_types_index.Dump (&s); + s.Printf("\nTypes:\n"); m_type_index.Dump (&s); + s.Printf("\nNamepaces:\n"); m_namespace_index.Dump (&s); + #endif } } @@ -2033,7 +2037,7 @@ SymbolFileDWARF::FindTypes(const SymbolContext& sc, const ConstString &name, boo DWARFCompileUnit* prev_cu = NULL; const DWARFDebugInfoEntry* die = NULL; std::vector<NameToDIE::Info> die_info_array; - const size_t num_matches = m_types_index.Find (name, die_info_array); + const size_t num_matches = m_type_index.Find (name, die_info_array); for (size_t i=0; i<num_matches; ++i, prev_cu = cu) { cu = info->GetCompileUnitAtIndex(die_info_array[i].cu_idx); @@ -2770,7 +2774,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu, { // We have a forward declaration std::vector<NameToDIE::Info> die_info_array; - const size_t num_matches = m_types_index.Find (type_name_const_str, die_info_array); + const size_t num_matches = m_type_index.Find (type_name_const_str, die_info_array); DWARFCompileUnit* type_cu = NULL; DWARFCompileUnit* curr_cu = dwarf_cu; DWARFDebugInfo *info = DebugInfo(); diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h index 2d794cc9dbd..cde081b77b2 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h @@ -313,8 +313,9 @@ protected: NameToDIE m_function_method_index; // All inlined functions NameToDIE m_function_selector_index; // All method names for functions of classes NameToDIE m_objc_class_selectors_index; // Given a class name, find all selectors for the class - NameToDIE m_global_index; // Global and static variables - NameToDIE m_types_index; // All type DIE offsets + NameToDIE m_global_index; // Global and static variables + NameToDIE m_type_index; // All type DIE offsets + NameToDIE m_namespace_index; // All type DIE offsets bool m_indexed; std::auto_ptr<DWARFDebugRanges> m_ranges; |

