summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2015-11-17 22:39:23 +0000
committerDavid Blaikie <dblaikie@gmail.com>2015-11-17 22:39:23 +0000
commit35c2eebfe45b9ca795cdd9a5d1bbe7ad69b332b3 (patch)
tree268b55934bec5c711c2e38c885ad98e8c28912f7 /llvm/lib
parent8483df6e243f243ade4acff77cb0ac8c2b88fe4e (diff)
downloadbcm5719-llvm-35c2eebfe45b9ca795cdd9a5d1bbe7ad69b332b3.tar.gz
bcm5719-llvm-35c2eebfe45b9ca795cdd9a5d1bbe7ad69b332b3.zip
dwarfdump: support indexed string dumping in dwp based on the STR_OFFSETS component of the index
llvm-svn: 253392
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp b/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
index 51c6c090eb3..53a149b1b23 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
@@ -37,7 +37,11 @@ DWARFUnit::DWARFUnit(DWARFContext &DC, const DWARFSection &Section,
const DWARFUnitSectionBase &UnitSection,
const DWARFUnitIndex::Entry *IndexEntry)
: Context(DC), InfoSection(Section), Abbrev(DA), RangeSection(RS),
- LineSection(LS), StringSection(SS), StringOffsetSection(SOS),
+ LineSection(LS), StringSection(SS), StringOffsetSection([&]() {
+ if (const auto *C = IndexEntry->getOffset(DW_SECT_STR_OFFSETS))
+ return SOS.slice(C->Offset, C->Offset + C->Length);
+ return SOS;
+ }()),
AddrOffsetSection(AOS), isLittleEndian(LE), UnitSection(UnitSection),
IndexEntry(IndexEntry) {
clear();
OpenPOWER on IntegriCloud