[llvm] Aggregate errors from llvm-dwarfutil --verify (PR #79648)

Jonas Devlieghere via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 30 10:34:26 PST 2024


JDevlieghere wrote:

> The amount and format of output from `llvm-dwarfutil --verify` makes it quite difficult to know if a change to a tool that produces or modifies DWARF is causing new problems, or is fixing existing problems. 

The way `dsymutil` solves this problem is by having different verification modes. 

```
  --verify-dwarf <verification mode>
                          Run the DWARF verifier on the input and/or output. Valid options are 'none, 'input', 'output', 'all' or 'auto' which runs the output verifier only if input verification passed.
```

Most of the time, invalid DWARF in means invalid DWARF out. 

> This diff adds a categorized summary of issues found by the DWARF verifier, on by default, at the bottom of the error output.

I didn't look at the patch, but from the description I'm not sure how aggregated error output solves this problem. 

Speaking from experience with `dsymutil`, I don't think you want to have the verifier on by default. It's pretty slow and trades off performance to have better error reporting. For `dsymutil`, I made the `auto` verification mode the default in `assert` builds. It's way too slow to turn on in production. 

https://github.com/llvm/llvm-project/pull/79648


More information about the llvm-commits mailing list