diff options
Diffstat (limited to 'lldb')
-rw-r--r-- | lldb/source/Plugins/SymbolFile/NativePDB/PdbIndex.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lldb/source/Plugins/SymbolFile/NativePDB/PdbIndex.cpp b/lldb/source/Plugins/SymbolFile/NativePDB/PdbIndex.cpp index 7aa656a405d..20bea853d6a 100644 --- a/lldb/source/Plugins/SymbolFile/NativePDB/PdbIndex.cpp +++ b/lldb/source/Plugins/SymbolFile/NativePDB/PdbIndex.cpp @@ -131,10 +131,7 @@ void PdbIndex::BuildAddrToSymbolMap(CompilandIndexItem &cci) { SegmentOffset so = GetSegmentAndOffset(*iter); lldb::addr_t va = MakeVirtualAddress(so); - // We need to add 4 here to adjust for the codeview debug magic - // at the beginning of the debug info stream. - uint32_t sym_offset = iter.offset() + 4; - PdbCompilandSymId cu_sym_id(modi, sym_offset); + PdbCompilandSymId cu_sym_id(modi, iter.offset()); // If the debug info is incorrect, we could have multiple symbols with the // same address. So use try_emplace instead of insert, and the first one @@ -201,7 +198,7 @@ CVSymbol PdbIndex::ReadSymbolRecord(PdbCompilandSymId cu_sym) const { // We need to subtract 4 here to adjust for the codeview debug magic // at the beginning of the debug info stream. const CompilandIndexItem *cci = compilands().GetCompiland(cu_sym.modi); - auto iter = cci->m_debug_stream.getSymbolArray().at(cu_sym.offset - 4); + auto iter = cci->m_debug_stream.getSymbolArray().at(cu_sym.offset); lldbassert(iter != cci->m_debug_stream.getSymbolArray().end()); return *iter; } |