[PATCH] D73086: [DWARF5] Added support for debug_macro section parsing and dumping in llvm-dwarfdump.

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 20 12:48:36 PST 2020


probinson added inline comments.


================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFDebugMacro.cpp:24
+               ", debug_line_offset = 0x%04" PRIx32 "\n",
+               getVersion(), getFlags(), getDebugLineOffset());
+}
----------------
I think printing the DebugLineOffset should be done only if the field is present (i.e., the corresponding flag is set).
You might also leave a FIXME for printing the opcode_operands_table.


================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFDebugMacro.cpp:148
+    return std::move(Status.takeError());
+  setDebugLineOffset(data.getU32(Offset));
+  return true;
----------------
This assumes that the offset_size_flag indicates 32-bit; it should either do the right thing, or check and reject 64-bit format.
This also assumes the debug_line_offset_flag bit is 1; it should check and skip parsing that field if the flag is 0.
Finally, it should parse (or skip with a warning) the optional opcode_operands_table.


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

https://reviews.llvm.org/D73086





More information about the llvm-commits mailing list