summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2017-09-27 09:33:45 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2017-09-27 09:33:45 +0000
commit65af0f958418dd20932c2dc5ea650f8b45448353 (patch)
treeaad7a27e7dcde3158f20462fb6138198f35e01b8 /llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
parent2064e8227723542cd0f1a5ed71f69a5e388e7f5f (diff)
downloadbcm5719-llvm-65af0f958418dd20932c2dc5ea650f8b45448353.tar.gz
bcm5719-llvm-65af0f958418dd20932c2dc5ea650f8b45448353.zip
[dwarfdump] Add support for -debug-line=OFFSET
This patch adds support for passing an offset to -debug-line. Differential revision: https://reviews.llvm.org/D38240 llvm-svn: 314288
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF/DWARFContext.cpp')
-rw-r--r--llvm/lib/DebugInfo/DWARF/DWARFContext.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
index 8bb47c94d54..f6c8499c94e 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
@@ -331,12 +331,15 @@ void DWARFContext::dump(
if (!CUDIE)
continue;
if (auto StmtOffset = toSectionOffset(CUDIE.find(DW_AT_stmt_list))) {
+ if (DumpOffset && *StmtOffset != *DumpOffset)
+ continue;
DWARFDataExtractor lineData(*DObj, DObj->getLineSection(),
isLittleEndian(), savedAddressByteSize);
DWARFDebugLine::LineTable LineTable;
uint32_t Offset = *StmtOffset;
// Verbose dumping is done during parsing and not on the intermediate
// representation.
+ OS << "debug_line[" << format("%16.16" PRIx64, Offset) << "]\n";
if (DumpOpts.Verbose) {
LineTable.parse(lineData, &Offset, &OS);
} else {
OpenPOWER on IntegriCloud