This is an archive of the discontinued LLVM Phabricator instance.

[dsymutil] Add -verify option to run DWARF verifier after linking.
ClosedPublic

Authored by JDevlieghere on Dec 3 2017, 12:57 PM.

Details

Summary

This patch adds support for running the DWARF verifier on the linked
debug info files. If the -verify options is specified and verification
fails, dsymutil exists with abort with non-zero exit code. This behavior
is *not* enabled by default.

Diff Detail

Repository
rL LLVM

Event Timeline

JDevlieghere created this revision.Dec 3 2017, 12:57 PM
vsk accepted this revision.Dec 4 2017, 12:03 PM

Looks good to me.

test/tools/dsymutil/X86/verify.test
4

Why are the copies needed?

This revision is now accepted and ready to land.Dec 4 2017, 12:03 PM
probinson added inline comments.
tools/dsymutil/dsymutil.cpp
105

This looks like an unrelated formatting change?
Also later on a couple of extra blank lines were removed. I'm guessing you ran clang-format on the whole file instead of using clang-format-diff. Generally we prefer whitespace/formatting changes to be done separately from functional changes.

JDevlieghere marked 2 inline comments as done.Dec 5 2017, 8:23 AM
JDevlieghere added inline comments.
test/tools/dsymutil/X86/verify.test
4

Thanks! I had copied this from another test where the flat mode mattered and output was written to the temp folder. It's not necessary for this test so we don't need the copies.

tools/dsymutil/dsymutil.cpp
105

Jup, this was unintentional. In addition to git clang-format before uploading the patch, I usually format new code in my editor by visually selecting it. However if you're in normal mode, it formats the whole file which is what must have happened here.

JDevlieghere marked 2 inline comments as done.
aprantl added inline comments.Dec 5 2017, 9:21 AM
tools/dsymutil/dsymutil.cpp
210

should this be gated by --verbose ?

JDevlieghere marked an inline comment as done.
aprantl accepted this revision.Dec 6 2017, 9:11 AM
This revision was automatically updated to reflect the committed changes.