[PATCH] D72158: [DebugInfo] Make most debug line prologue errors non-fatal to parsing

Pavel Labath via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 14 06:14:15 PST 2020


labath added inline comments.


================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp:323-325
+    // Treat this error as unrecoverable - we cannot be sure what any of
+    // the data represents including the length field, so cannot skip it or make
+    // any reasonable assumptions.
----------------
BTW, I think this error should be recoverable too. I believe the reason why the length field comes *before* the version number is specifically so that one can skip over contributions with unsupported (future) version numbers.

While it's hard to say what the future versions of dwarf will look like, I would expect that the committee will try very hard to avoid  making changes in the length field. I think they'd use one of the DW_LENGTH_lo_reserved..DW_LENGTH_hi_reserved-1 constants for severely incompatible changes.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72158





More information about the llvm-commits mailing list