This is an archive of the discontinued LLVM Phabricator instance.

DWARFVerifier: verify debug_names abbreviation table
ClosedPublic

Authored by labath on Mar 21 2018, 7:20 AM.

Details

Summary

This commit adds checks of the abbreviation table in a DWARF v5 Name
Index. The most interesting/useful check is the one which checks that
each index attributes is encoded using the correct form class, but it
also checks for the more obvious errors like unknown
forms/tags/attributes and duplicated attributes.

Diff Detail

Repository
rL LLVM

Event Timeline

labath created this revision.Mar 21 2018, 7:20 AM
JDevlieghere accepted this revision.Mar 22 2018, 4:51 AM

LGTM!

lib/DebugInfo/DWARF/DWARFVerifier.cpp
970 ↗(On Diff #139291)

nit: can we move this above the table initialization?

This revision is now accepted and ready to land.Mar 22 2018, 4:51 AM

Does this patch covers all planned checks or there are any left which will
come later?

Does this patch covers all planned checks or there are any left which will
come later?

There are more to come. In fact, these checks are relatively uninteresting (to me), but I am using it as a foundation for the main check, which is the one that compares the information in the accelerator table with the data I obtain by manually indexing the .debug_info section (I intend to use that to validate the generator by running the verifier on all binaries that I can get my hands on).

lib/DebugInfo/DWARF/DWARFVerifier.cpp
970 ↗(On Diff #139291)

sure

This revision was automatically updated to reflect the committed changes.