[PATCH] D80874: [llvm-dwarfdump] Add a table header for -debug-line -verbose output

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 3 06:33:17 PDT 2020


jhenderson requested changes to this revision.
jhenderson added inline comments.
This revision now requires changes to proceed.


================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp:711-712
 
+  if (OS)
+    Row::dumpTableHeader(*OS, 12);
+
----------------
Actually, just realised this is the wrong place for this - this will cause, in verbose output, the header to be printed, even if there are no rows, unlike non-verbose output. We should try to match the two up. Also, there's a new line in non-verbose output between the prologue and this header, please add it here too.

I think the best thing to do might be to move this code to just inside the while loop, executed on the first run only. This would mean the header is printed before any verbose opcodes are printed, although it would also mean it was printed even if there are no rows emitted to the table, due to a malformed table, which is slightly inconsistent. I'm open to alternatives. For now, I'm going to use my suggestion in my update to D80989. That will also cause the difference between non-verbose and verbose output to disappear, but not between those outputs and the `LineTable::dump()`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80874/new/

https://reviews.llvm.org/D80874





More information about the llvm-commits mailing list