summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
diff options
context:
space:
mode:
authorWolfgang Pieb <Wolfgang.Pieb@sony.com>2018-10-09 18:38:55 +0000
committerWolfgang Pieb <Wolfgang.Pieb@sony.com>2018-10-09 18:38:55 +0000
commita9ea9c5034ddca7ccd5285b34a3d1c2772b12862 (patch)
tree475f202f767bba0763f5899f6d2fe3a406b03d3d /llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
parent1238e6c2070451aa90b2da5066e14710ede5c03a (diff)
downloadbcm5719-llvm-a9ea9c5034ddca7ccd5285b34a3d1c2772b12862.tar.gz
bcm5719-llvm-a9ea9c5034ddca7ccd5285b34a3d1c2772b12862.zip
[DWARF] Make llvm-dwarfdump display the .debug_loc.dwo section. Fixes PR38991.
Reviewer: dblaikie Differential Revision: https://reviews.llvm.org/D52444 llvm-svn: 344068
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF/DWARFContext.cpp')
-rw-r--r--llvm/lib/DebugInfo/DWARF/DWARFContext.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
index 118a2ebf127..ddabc7a4652 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
@@ -692,11 +692,10 @@ const DWARFDebugLocDWO *DWARFContext::getDebugLocDWO() {
LocDWO.reset(new DWARFDebugLocDWO());
// Assume all compile units have the same address byte size.
- if (getNumCompileUnits()) {
- DataExtractor LocData(DObj->getLocDWOSection().Data, isLittleEndian(),
- getUnitAtIndex(0)->getAddressByteSize());
- LocDWO->parse(LocData);
- }
+ // FIXME: We don't need AddressSize for split DWARF since relocatable
+ // addresses cannot appear there. At the moment DWARFExpression requires it.
+ DataExtractor LocData(DObj->getLocDWOSection().Data, isLittleEndian(), 4);
+ LocDWO->parse(LocData);
return LocDWO.get();
}
OpenPOWER on IntegriCloud