diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2017-09-21 20:15:30 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2017-09-21 20:15:30 +0000 |
commit | 26f9a0c5297ec09a2b057bcb818d64c9414f5f01 (patch) | |
tree | 862dc9da36ec8147dc4d43aa58ac34de69b309b5 /llvm/lib/DebugInfo/DWARF/DWARFContext.cpp | |
parent | 05eac276776d51323d36d2d29c4d2f8482fc75c3 (diff) | |
download | bcm5719-llvm-26f9a0c5297ec09a2b057bcb818d64c9414f5f01.tar.gz bcm5719-llvm-26f9a0c5297ec09a2b057bcb818d64c9414f5f01.zip |
[dwarfdump] Add verbose output for .debug-line section
This patch adds dumping of line table instructions as well as the final
state at each specified pc value in verbose mode. This is essentially
the same as the default in Darwin's dwarfdump. Dumping the actual line
table opcodes can be particularly useful for something like debugging a
bad `.debug_line` section.
Differential revision: https://reviews.llvm.org/D37971
llvm-svn: 313910
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF/DWARFContext.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFContext.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp index 69a4fe64b75..59cf636e604 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp @@ -335,8 +335,14 @@ void DWARFContext::dump( isLittleEndian(), savedAddressByteSize); DWARFDebugLine::LineTable LineTable; uint32_t Offset = *StmtOffset; - LineTable.parse(lineData, &Offset); - LineTable.dump(OS); + // Verbose dumping is done during parsing and not on the intermediate + // representation. + if (DumpOpts.Verbose) { + LineTable.parse(lineData, &Offset, &OS); + } else { + LineTable.parse(lineData, &Offset); + LineTable.dump(OS); + } } } } |