[Lldb-commits] [PATCH] D102851: [lldb] Improve invalid DWARF DW_AT_ranges error reporting

David Blaikie via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu May 20 10:31:15 PDT 2021


dblaikie accepted this revision.
dblaikie added a comment.
This revision is now accepted and ready to land.

Looks good to me - at least includes more values from the file to point to the problem. Though phrasing might be better (I guess some other code prints the "DW_AT_ranges(0x0) attribute" part, which to me seems a bit weird (doesn't include the form, which might be useful for instance) and the "00000000: " prefix on the "DW_FORM_rnglistx cannot be used" part is maybe a bit of a strange way to print the CU offset (nothing in the diagnostic says what this number is) - maybe the higher level error handling could print these high level details out as a suffix ("Failure in CU that begins at offset <blah>, in DIE at offset <blah>, at attribute DW_AT_*, encoded with DW_FORM_*, with value blah").

But probably not a big deal - if someone's getting sufficiently bogus DWARF to reach this, they can probably figure it out. Maybe other LLDB folks have some ideas about how best to structure the error handling more generally in this regard.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102851



More information about the lldb-commits mailing list