This is an archive of the discontinued LLVM Phabricator instance.

[DWARF] Support DWARF64 in DWARFListTableHeader.
ClosedPublic

Authored by ikudrin on Aug 23 2019, 5:06 AM.

Details

Summary

This enables 64-bit DWARF support for parsing range and location list tables.

Diff Detail

Repository
rL LLVM

Event Timeline

ikudrin created this revision.Aug 23 2019, 5:06 AM

Seems reasonable.

lib/DebugInfo/DWARF/DWARFListTable.cpp
30 ↗(On Diff #216810)

Should there be an error if the header is neither known size?

probinson added inline comments.Aug 23 2019, 8:42 AM
lib/DebugInfo/DWARF/DWARFListTable.cpp
30 ↗(On Diff #216810)

I agree, if the first 4 bytes hold a value that's reserved by DWARF then we should return an error.

ikudrin updated this revision to Diff 217884.Aug 29 2019, 8:09 AM
  • Added a check for reserved values of the length field.
This revision is now accepted and ready to land.Sep 4 2019, 10:36 AM
MaskRay accepted this revision.Sep 4 2019, 10:03 PM
MaskRay added inline comments.
test/tools/llvm-dwarfdump/X86/debug_rnglists_reserved_length.s
3 ↗(On Diff #217884)

An optional suggestion: you can also use --implicit-check-not=error and delete CHECK-NOT: error: below.

ikudrin updated this revision to Diff 218842.Sep 4 2019, 11:32 PM
  • Use --implicit-check-not=error.
This revision was automatically updated to reflect the committed changes.
llvm/trunk/lib/DebugInfo/DWARF/DWARFListTable.cpp