summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ObjectFile
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2019-10-21 09:26:55 +0300
committerMartin Storsjö <martin@martin.st>2019-10-29 14:48:35 +0200
commit4394b5bee615a8c0d1703261204a5bd53d0d54ce (patch)
treeb1a743435e135ab519a07f54eb4e8e655f7fcc68 /lldb/source/Plugins/ObjectFile
parent1ba72a81cac8ac158986b83e8a87cdb97f4d1d3a (diff)
downloadbcm5719-llvm-4394b5bee615a8c0d1703261204a5bd53d0d54ce.tar.gz
bcm5719-llvm-4394b5bee615a8c0d1703261204a5bd53d0d54ce.zip
[LLDB] [PECOFF] Use FindSectionByID to associate symbols to sections
The virtual container/header section caused the section list to be offset by one, but by using FindSectionByID, the layout of the section list shouldn't matter. Differential Revision: https://reviews.llvm.org/D69366
Diffstat (limited to 'lldb/source/Plugins/ObjectFile')
-rw-r--r--lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
index 7e8bcb38e6f..8fa9e2000cf 100644
--- a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
+++ b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
@@ -685,7 +685,7 @@ Symtab *ObjectFilePECOFF::GetSymtab() {
symbol.naux = symtab_data.GetU8(&offset);
symbols[i].GetMangled().SetValue(ConstString(symbol_name.c_str()));
if ((int16_t)symbol.sect >= 1) {
- Address symbol_addr(sect_list->GetSectionAtIndex(symbol.sect - 1),
+ Address symbol_addr(sect_list->FindSectionByID(symbol.sect),
symbol.value);
symbols[i].GetAddressRef() = symbol_addr;
symbols[i].SetType(MapSymbolType(symbol.type));
OpenPOWER on IntegriCloud