This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo] Support parsing and dumping of DWARF64 macro units.
ClosedPublic

Authored by ikudrin on Jun 15 2020, 8:15 AM.

Diff Detail

Event Timeline

ikudrin created this revision.Jun 15 2020, 8:15 AM
SouraVX accepted this revision.Jun 15 2020, 9:05 AM

LGTM, Thanks! Please wait for other reviewers, in case if they've any comments.

This revision is now accepted and ready to land.Jun 15 2020, 9:05 AM
dblaikie added inline comments.Jun 15 2020, 12:30 PM
llvm/lib/DebugInfo/DWARF/DWARFDebugMacro.cpp
31–32

This is a bit redundant and possibly confusing - the format is given by the flags. Perhaps the flags should be decomposed into their semantic values and rendered that way (& render the raw flag value if it contains other bits set that aren't described by the spec)?

Though I guess it's not entirely inconsistent with the way we print the format and the length in other sections, when the format is sort of described by the length..

jhenderson added inline comments.Jun 16 2020, 2:17 AM
llvm/test/DebugInfo/X86/debug-macro-dwarf64.s
54

Nit: no new line at EOF.

ikudrin marked 3 inline comments as done.Jun 16 2020, 4:04 AM
ikudrin added inline comments.
llvm/lib/DebugInfo/DWARF/DWARFDebugMacro.cpp
31–32

Sorry, but I do not fully understand what you are suggesting to change exactly.

I guess that reporting Flags in some cases while omitting it in others might not be a good practice. We discussed something similar for a patch that added reporting the format and the common consensus was that it is better to print the format for both variants rather than only for DWARF64.

We could decode the value of Flags in each case, but that is already done even if in a bit indirect way. We dump debug_line_offset only if the corresponding flag is set and, with this patch, we explicitly dump the format. The only remaining flag, opcode_operands_table, is not supported yet. But even if we decide to explicitly explain Flags, that should be a separate patch.

llvm/test/DebugInfo/X86/debug-macro-dwarf64.s
54

Thanks! Sorry. I guess it is time to tackle the settings of my VS Code.

dblaikie accepted this revision.Jun 16 2020, 3:59 PM
dblaikie added inline comments.
llvm/lib/DebugInfo/DWARF/DWARFDebugMacro.cpp
31–32

Fair enough - thanks for the explanation.

This revision was automatically updated to reflect the committed changes.
ikudrin marked an inline comment as done.
llvm/test/DebugInfo/X86/debug-macro-v5.s