This is an archive of the discontinued LLVM Phabricator instance.

Debug Info: Restore the pre-r240853 behavior for DWARF 2 bitfields.
ClosedPublic

Authored by aprantl on Apr 27 2016, 3:01 PM.

Details

Summary

This is a spiritual revert of r240853.

The DWARF 2 specification of DW_AT_bit_offset is written from the perspective of a big-endian machine and is ambiguous for little-endian machines.

The way that LLVM pre-r240853 interprets it can result in negative field offsets, which I attempted to fix in r240853. However, it turns out that debuggers actually expect this format using negative offsets and other popular compilers also generate them this way. I therefor suggest to just revert back to the old behavior.

Note that D19630 implements the unambiguous and more space-efficient DWARF4 version using the new DW_AT_data_bit_offset attribute.

Diff Detail

Event Timeline

aprantl updated this revision to Diff 55334.Apr 27 2016, 3:01 PM
aprantl retitled this revision from to Debug Info: Restore the pre-r240853 behavior for DWARF2 bitfields. .
aprantl updated this object.
aprantl added reviewers: echristo, dblaikie, probinson.
aprantl set the repository for this revision to rL LLVM.
aprantl added subscribers: clayborg, llvm-commits.
aprantl retitled this revision from Debug Info: Restore the pre-r240853 behavior for DWARF2 bitfields. to Debug Info: Restore the pre-r240853 behavior for DWARF 2 bitfields. .Apr 27 2016, 4:17 PM
aprantl updated this object.
aprantl accepted this revision.Nov 14 2016, 1:40 PM
aprantl added a reviewer: aprantl.

This landed long ago as r267896.

This revision is now accepted and ready to land.Nov 14 2016, 1:40 PM
aprantl closed this revision.Nov 14 2016, 1:40 PM