This is an archive of the discontinued LLVM Phabricator instance.

[dsymutil] Accept DWARF4 line tables.
ClosedPublic

Authored by JDevlieghere on Dec 11 2017, 11:59 AM.

Details

Summary

This patch removes the hard-coded check for DWARFv2 line tables. Now
dsymutil accepts line tables for DWARF versions 2 to 5 (inclusive).

Diff Detail

Repository
rL LLVM

Event Timeline

JDevlieghere created this revision.Dec 11 2017, 11:59 AM
probinson added inline comments.Dec 11 2017, 12:43 PM
tools/dsymutil/DwarfLinker.cpp
3235 ↗(On Diff #126416)

This calculation is incorrect for v5, which has an extra 2 bytes of information before the header_length field. Your choice whether to fix the calculation or restrict dsymutil to no higher than v4.

probinson requested changes to this revision.Dec 11 2017, 12:44 PM
This revision now requires changes to proceed.Dec 11 2017, 12:44 PM
JDevlieghere added inline comments.Dec 11 2017, 12:55 PM
tools/dsymutil/DwarfLinker.cpp
3235 ↗(On Diff #126416)

Thanks Paul! I will update the calculation.

JDevlieghere edited edge metadata.
JDevlieghere marked 2 inline comments as done.
  • Fix calculation and add test for DWARFv5
aprantl accepted this revision.Dec 11 2017, 2:57 PM
aprantl added inline comments.
tools/dsymutil/DwarfLinker.cpp
3246 ↗(On Diff #126448)

Comment where the extra two bytes come from?

probinson accepted this revision.Dec 11 2017, 2:58 PM

Awesome. LGTM.

This revision is now accepted and ready to land.Dec 11 2017, 2:58 PM
This revision was automatically updated to reflect the committed changes.