summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins
diff options
context:
space:
mode:
authorAdrian McCarthy <amccarth@google.com>2019-03-12 17:40:51 +0000
committerAdrian McCarthy <amccarth@google.com>2019-03-12 17:40:51 +0000
commit38d4a6c496e3321584cbc89e19c9a5fbed4ec889 (patch)
tree93e20c6ad4bbb10ac7462b56606685d433f1ddc2 /lldb/source/Plugins
parent8cf8bb13132a8e7e44c88fe9749e89a0b1ab58df (diff)
downloadbcm5719-llvm-38d4a6c496e3321584cbc89e19c9a5fbed4ec889.tar.gz
bcm5719-llvm-38d4a6c496e3321584cbc89e19c9a5fbed4ec889.zip
Correcting some comments in PdbIndex.cpp [NFC]
ICF can cause multiple symbols to start at the same virtual address. I plan to handle this shortly, but I wanted to correct the comment for now. Deleted an obsolete comment about adjusting the offset for the magic number at the beginning of the debug info stream. This adjustment is handled at a lower level now. llvm-svn: 355943
Diffstat (limited to 'lldb/source/Plugins')
-rw-r--r--lldb/source/Plugins/SymbolFile/NativePDB/PdbIndex.cpp7
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 31a31be5728..ba9a95b16e1 100644
--- a/lldb/source/Plugins/SymbolFile/NativePDB/PdbIndex.cpp
+++ b/lldb/source/Plugins/SymbolFile/NativePDB/PdbIndex.cpp
@@ -132,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)));
}
}
@@ -186,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());
OpenPOWER on IntegriCloud