[PATCH] D73086: [DWARF5] Added support for debug_macro section parsing and dumping in llvm-dwarfdump.
Sourabh Singh Tomar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 3 09:40:11 PST 2020
SouraVX marked an inline comment as done.
SouraVX added inline comments.
================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFDebugMacro.cpp:25
+ Macros.getVersion(), Macros.getFlags());
+ if (Macros.getFlags() == MACRO_DEBUG_LINE_OFFSET) {
+ OS << format(", debug_line_offset = 0x%04" PRIx32 "\n",
----------------
ikudrin wrote:
> ikudrin wrote:
> > This will print the `debug_line_offset` field only if the format is DWARF32 and no `opcode_operands_table` is present. This is not correct in view of further changes. Please check the flag in a proper way, with bitwise operators.
> You do not need brackets if there is only one instruction in the branch.
We don't have to worry about DWARF32/64, Since we for case DWARF64 we already stoped further parsing if DWARF64 is present.
+I've not checked operand_table_flag at all, since that's also not parsed -- left it as FIXME in both parsing/dumping functions.
Here we just check whether the debug_line_offset is present or not before dumping. that is also conditionally parsed[corrected in this revision] in parseMacroHeader..
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73086/new/
https://reviews.llvm.org/D73086
More information about the llvm-commits
mailing list