[PATCH] D37971: [dwarfdump] Add verbose output for .debug-line section
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 18 08:55:57 PDT 2017
aprantl added a comment.
Added a couple more inline comments.
Since you aren't checking for the verbose details in many of the modified tests, perhaps it would be better to replace the RUN command with a --debug-line (non-verbose) invocation?
This is not super important, so feel free to decide what to do on a case-by-case basis.
================
Comment at: lib/DebugInfo/DWARF/DWARFContext.cpp:340
uint32_t Offset = *StmtOffset;
- LineTable.parse(lineData, &Offset);
- LineTable.dump(OS);
+ if (DumpOpts.Verbose) {
+ LineTable.parse(lineData, &Offset, &OS);
----------------
Add: `// Verbose dumping is done during parsing and not on the intermediate representation.`
================
Comment at: lib/DebugInfo/DWARF/DWARFDebugLine.cpp:445
+ if (OS) {
+ *OS << "DW_LNE_end_sequence\n";
+ OS->indent(12);
----------------
dblaikie wrote:
> If we don't have one already, should probably have a DW_LNE enum stringification function generated from Dwarf.def - and use that to print the DW_LNE_* first, outside the switch, then use the switch to dump the specific parameters, if any, etc.
To avoid typos and make the binary smaller, I'd prefer:
`dwarf::LNExtendedString(DW_LNE_end_sequence)`
here and below...
https://reviews.llvm.org/D37971
More information about the llvm-commits
mailing list