This is an archive of the discontinued LLVM Phabricator instance.

Verify that no compile units share the same line table in "llvm-dwarfdump --verify"
ClosedPublic

Authored by clayborg on May 2 2017, 4:19 PM.

Details

Summary

Check to make sure no compile units have the same DW_AT_stmt_list values. Report a verification error if they do.

Diff Detail

Repository
rL LLVM

Event Timeline

clayborg created this revision.May 2 2017, 4:19 PM
aprantl requested changes to this revision.May 2 2017, 5:06 PM
aprantl added inline comments.
lib/DebugInfo/DWARF/DWARFContext.cpp
298 ↗(On Diff #97520)

I think it starts to make sense to create a lib/DebugInfo/DWARF/DWARFVerifier.cpp file.

487 ↗(On Diff #97520)

The check is fine, but this function is starting to get really long and hard to follow, especially with all the continues. Could you break it up into smaller bool verifyXXX() or visitXXX() helpers?

This revision now requires changes to proceed.May 2 2017, 5:06 PM

It is fine to create a DWARFVerifier.cpp, but can we do that in the next patch? Do you really want to review a patch where everything is moved around? And all functionality is moved around? This patch is nice and self contained.

aprantl accepted this revision.May 3 2017, 8:38 AM

Sure. I'm fine with a separate commit that breaks the Verifier out into its own file and also breaks the current HandleDebugLine function (which btw. should start with a lower-case character) into smaller functions.

This revision is now accepted and ready to land.May 3 2017, 8:38 AM
This revision was automatically updated to reflect the committed changes.