This is an archive of the discontinued LLVM Phabricator instance.

[MC] Generate .debug_rnglists in the 64-bit DWARF format [5/7]
ClosedPublic

Authored by ikudrin on Jun 4 2020, 5:09 AM.

Details

Summary

In addition, the patch fixes referencing the section within a compilation unit.

Diff Detail

Event Timeline

ikudrin created this revision.Jun 4 2020, 5:09 AM
MaskRay accepted this revision.Jun 4 2020, 11:24 AM

Looks great!

llvm/test/MC/ELF/gen-dwarf64.s
51

The SAME directive can be joined to the previous line: {{.*}}, format = DWARF64

This revision is now accepted and ready to land.Jun 4 2020, 11:24 AM
probinson added inline comments.Jun 4 2020, 1:47 PM
llvm/lib/MC/MCDwarf.cpp
1025

This function (EmitGenDwarfInfo) is for emitting DWARF to describe raw assembler source, which I believe is not really the interesting case.

dblaikie added inline comments.Jun 4 2020, 2:43 PM
llvm/lib/MC/MCDwarf.cpp
1025

Might be best to keep the fundamental design direction/question here in one thread ( https://reviews.llvm.org/D81144 ) rather than in all of them. Patches are in a series, so if that one ends up going another direction I don't think there's a risk these later ones will be reviewed/approved/committed in spite of that fundamental question.

llvm/test/MC/ELF/gen-dwarf64.s
51–52

Test the length is correct, since this patch changes how it's emitted.

jhenderson accepted this revision.Jun 5 2020, 12:35 AM

Looks good to me, once @MaskRay's and @dblaikie's comments have been addressed.

ikudrin updated this revision to Diff 268814.Jun 5 2020, 8:28 AM
ikudrin marked 2 inline comments as done.
  • Updated the test.
dblaikie accepted this revision.Jun 5 2020, 9:24 AM

Looks good, thanks!

jhenderson accepted this revision.Jun 8 2020, 12:27 AM

LGTM again.

llvm/test/MC/ELF/gen-dwarf64.s
31–32

Up to you, but you could probably simplify this line, by deleting everything after format = DWARF64

51

Same comment as above.

ikudrin marked an inline comment as done.Jun 8 2020, 12:50 AM
ikudrin added inline comments.
llvm/test/MC/ELF/gen-dwarf64.s
31–32

That was my initial variant, but later I decided to extend the check to avoid potential cases when the format is DWARF64, but the data is malformed, e.g. if the emitting of cu_offset was not fixed.

ikudrin updated this revision to Diff 269154.Jun 8 2020, 3:35 AM
  • Updated to reflect changes in parent revisions.
This revision was automatically updated to reflect the committed changes.