This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo] Fix emitting the DW_AT_location attribute for 64-bit DWARFv3 (7/19).
ClosedPublic

Authored by ikudrin on Sep 2 2020, 6:22 AM.

Details

Summary

The patch uses a common method to determine the appropriate form for the value of the attribute.

Diff Detail

Event Timeline

ikudrin created this revision.Sep 2 2020, 6:22 AM
ikudrin requested review of this revision.Sep 2 2020, 6:22 AM
dblaikie accepted this revision.Sep 2 2020, 2:20 PM

Looks good

llvm/test/DebugInfo/X86/DW_AT_location-reference.ll
44

Should this be dumped in a different format/more digits to match the number of bytes in the field?

This revision is now accepted and ready to land.Sep 2 2020, 2:20 PM
ikudrin added inline comments.Sep 3 2020, 2:31 AM
llvm/test/DebugInfo/X86/DW_AT_location-reference.ll
44

That is how DWARFLocationTable::dumpLocationList() dumps the offset. At that moment, the information about the form of the value is lost.

ikudrin updated this revision to Diff 289719.Sep 3 2020, 7:36 AM
ikudrin retitled this revision from [DebugInfo] Fix emitting the DW_AT_location attribute for 64-bit DWARFv3 (9/19). to [DebugInfo] Fix emitting the DW_AT_location attribute for 64-bit DWARFv3 (7/19)..
  • Updated the test because the patch is being moved before fixing emitters for pre-v5 name lookup tables.
dblaikie accepted this revision.Sep 3 2020, 12:06 PM
dblaikie added inline comments.
llvm/test/DebugInfo/X86/DW_AT_location-reference.ll
44

Fair enough, just a thought to consider/keep in mind at some point. Consistency in dumping seems important if we're going to use longer fields to indicate longer encodings. Only using that strategy sometimes seems like it could be more confusing than helpful.