summaryrefslogtreecommitdiff
path: root/source/Plugins/SymbolFile/NativePDB/PdbIndex.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Plugins/SymbolFile/NativePDB/PdbIndex.cpp')
-rw-r--r--source/Plugins/SymbolFile/NativePDB/PdbIndex.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/source/Plugins/SymbolFile/NativePDB/PdbIndex.cpp b/source/Plugins/SymbolFile/NativePDB/PdbIndex.cpp
index 9f5dab6c2e84..ba9a95b16e18 100644
--- a/source/Plugins/SymbolFile/NativePDB/PdbIndex.cpp
+++ b/source/Plugins/SymbolFile/NativePDB/PdbIndex.cpp
@@ -1,9 +1,8 @@
//===-- PdbIndex.cpp --------------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -133,9 +132,8 @@ void PdbIndex::BuildAddrToSymbolMap(CompilandIndexItem &cci) {
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
- // will win.
+ // It's rare, but we could have multiple symbols with the same address
+ // because of identical comdat folding. Right now, the first one will win.
cci.m_symbols_by_va.insert(std::make_pair(va, PdbSymUid(cu_sym_id)));
}
}
@@ -187,8 +185,6 @@ std::vector<SymbolAndUid> PdbIndex::FindSymbolsByVa(lldb::addr_t va) {
}
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);
lldbassert(iter != cci->m_debug_stream.getSymbolArray().end());