[PATCH] D64544: [DWARF] Add more error handling to debug line parser.

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 17 10:58:48 PDT 2019


probinson added a comment.

In D64544#1589853 <https://reviews.llvm.org/D64544#1589853>, @dblaikie wrote:

> I was rather hoping for test coverage for all the new error messages this change introduced - is that unrealistic/impractical?
>
> Yeah, the line table is especially tricky to hand-craft compared to checking in an object file. I think it technically can still be hand-crafted assembly (no line directives, etc, just a debug_line section with raw byte (etc) directives) - might be plausible & make it clearer what the input is? (checked in assembly, assembled with llvm-mc then run through llvm-dwarfdump to test the parsing)


Hear hear.  It looks like this patch is all about diagnosing issues in the v5 prologue/file-table, and it should be relatively easy to construct bogus examples in assembler.  You don't need a line-number program at all.  There ought to be examples of *valid* v5 line-table headers lying around, I know I did all the dumper work with assembler tests before I ever generated any v5 headers.


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

https://reviews.llvm.org/D64544





More information about the llvm-commits mailing list