This is an archive of the discontinued LLVM Phabricator instance.

[llvm/DebugInfo] Fix invalid verifier error for DWARF5
ClosedPublic

Authored by JDevlieghere on Apr 27 2020, 4:43 PM.

Details

Summary

We were unconditionally comparing the DW_AT_ranges offset to the length of the .debug_ranges section. For DWARF5 we should look at the debug_rnglists section instead.

Diff Detail

Event Timeline

JDevlieghere created this revision.Apr 27 2020, 4:43 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 27 2020, 4:43 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
JDevlieghere edited the summary of this revision. (Show Details)Apr 27 2020, 4:43 PM
aprantl accepted this revision.Apr 28 2020, 10:08 AM

Seems reasonable. Nitpick inside :-)

thanks!

llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
467

is there a RangeSection.getName()? Because on Mach-O the section would technically be called __debug_ranges, for example.

This revision is now accepted and ready to land.Apr 28 2020, 10:08 AM
JDevlieghere marked 2 inline comments as done.Apr 28 2020, 10:12 AM
JDevlieghere added inline comments.
llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
467

Not currently. But that does sound like a good improvement, which we should apply everywhere. Below for example ".debug_line" is also printed as part of the error message.

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