This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo] Fix emitting DWARF64 .debug_names sections (16/19).
ClosedPublic

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

Details

Summary

The patch fixes emitting the unit length field in the header of the table and offsets to the entry pool. Note that while the patch changes the common method to emit offsets, in fact, nothing is changed for Apple accelerator tables, because we do not yet support DWARF64 for those targets.

Diff Detail

Event Timeline

ikudrin created this revision.Sep 2 2020, 6:23 AM
ikudrin requested review of this revision.Sep 2 2020, 6:23 AM
dblaikie added inline comments.Sep 2 2020, 9:41 PM
llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp
273

Where is this one tested? Is this offset rendered in the dump output at all?

llvm/test/DebugInfo/X86/debug-names-dwarf64.ll
10

I'd probably include the 0x in the match - so the later reference to this match doesn't have to specify the 0x too.

27

Is this a 64 bit offset & should be rendered as such?

ikudrin updated this revision to Diff 289724.Sep 3 2020, 7:56 AM
ikudrin marked an inline comment as done.
  • Updated the test as suggested.
llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp
273

The line emits offsets to entries. They are rendered in the dump after Entry @. They are not checked in the test directly, but as far as llvm-dwarfdump can interpret the section and find entries with expected information, we assume that the offsets are emitted properly.

llvm/test/DebugInfo/X86/debug-names-dwarf64.ll
27

Took a note for improving llvm-dwarfdump in the future. Right now the offsets are dumped as 32-bit.

dblaikie accepted this revision.Sep 10 2020, 7:09 PM

Looks good, thanks!

This revision is now accepted and ready to land.Sep 10 2020, 7:09 PM