This is an archive of the discontinued LLVM Phabricator instance.

DWARFVerifier: Basic verification of .debug_names
ClosedPublic

Authored by labath on Mar 7 2018, 8:23 AM.

Details

Summary

This patch adds basic .debug_names verification capabilities to the
DWARF verifier. Right now, it checks that the headers and abbreviation
tables of the individual name indexes can be parsed correctly, it
verifies the buckets table and the cross-checks the CU lists for
consistency. I intend to add further checks in follow-up patches.

I am not entirely sure I have the different message levels calibrated
correctly here: I flag the case when multiple name indexes reference the
same CU as a warning, but I think that could easily be considered an
error as well. Also, the case of a CU not being covered by any index
could possibly be upgrated to a warning as well.

Diff Detail

Repository
rL LLVM

Event Timeline

labath created this revision.Mar 7 2018, 8:23 AM
aprantl accepted this revision.Mar 7 2018, 8:37 AM
This revision is now accepted and ready to land.Mar 7 2018, 8:37 AM

I think you can be generous with the levels. I see a note more as a thing that follows a warning or an error with some more context, rather than a statement by itself.

include/llvm/DebugInfo/DWARF/DWARFVerifier.h
241 ↗(On Diff #137398)

individual ?

244 ↗(On Diff #137398)

missing .

labath marked 2 inline comments as done.Mar 8 2018, 7:18 AM

Thanks for the feedback. I'll upgrade the note/warning levels and commit.

include/llvm/DebugInfo/DWARF/DWARFVerifier.h
241 ↗(On Diff #137398)

individual name indices :)

This revision was automatically updated to reflect the committed changes.
labath marked an inline comment as done.