diff options
| -rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwp.cpp | 14 | ||||
| -rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwp.h | 2 |
2 files changed, 11 insertions, 5 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwp.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwp.cpp index dc57aa4eed1..1dc1dab34a5 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwp.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwp.cpp @@ -69,17 +69,21 @@ SymbolFileDWARFDwp::Create(lldb::ModuleSP module_sp, debug_cu_index.GetAddressByteSize()); if (!dwp_symfile->m_debug_cu_index.parse(llvm_debug_cu_index)) return nullptr; + dwp_symfile->InitDebugCUIndexMap(); return dwp_symfile; } -SymbolFileDWARFDwp::SymbolFileDWARFDwp(lldb::ModuleSP module_sp, - lldb::ObjectFileSP obj_file) - : m_obj_file(std::move(obj_file)), m_debug_cu_index(llvm::DW_SECT_INFO) { - for (const auto &entry : m_debug_cu_index.getRows()) { +void SymbolFileDWARFDwp::InitDebugCUIndexMap() { + m_debug_cu_index_map.clear(); + for (const auto &entry : m_debug_cu_index.getRows()) m_debug_cu_index_map.emplace(entry.getSignature(), &entry); - } } +SymbolFileDWARFDwp::SymbolFileDWARFDwp(lldb::ModuleSP module_sp, + lldb::ObjectFileSP obj_file) + : m_obj_file(std::move(obj_file)), m_debug_cu_index(llvm::DW_SECT_INFO) +{} + std::unique_ptr<SymbolFileDWARFDwo> SymbolFileDWARFDwp::GetSymbolFileForDwoId(DWARFCompileUnit *dwarf_cu, uint64_t dwo_id) { diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwp.h b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwp.h index aaa992c3ac0..a7372b9358b 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwp.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwp.h @@ -40,6 +40,8 @@ private: bool LoadRawSectionData(lldb::SectionType sect_type, lldb_private::DWARFDataExtractor &data); + + void InitDebugCUIndexMap(); lldb::ObjectFileSP m_obj_file; |

