[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
Fri Mar 6 03:51:11 PST 2020


SouraVX updated this revision to Diff 248686.
SouraVX added a comment.

Addressed outstanding comments by @Ikudrin. Thanks for the generous reviews comments.
-Corrected HANDLE_MACRO_FLAGS to HANDLE_MACRO_FLAG
-Simplified error handling to use Error.
-Removed un-initalized read of `Header.getVersion()`, since we still need version information to decide which version is present, I've added `Version` field `struct MacroList`, this field value is set while parsing the content and used in dumping code.
-Reduced the test a bit further + extended the test case to include another macro unit missing `debug_line_offset`(optional field) -- implementation is able to parse and dump both units correctly.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73086/new/

https://reviews.llvm.org/D73086

Files:
  llvm/include/llvm/BinaryFormat/Dwarf.def
  llvm/include/llvm/BinaryFormat/Dwarf.h
  llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
  llvm/include/llvm/DebugInfo/DWARF/DWARFDebugMacro.h
  llvm/include/llvm/DebugInfo/DWARF/DWARFObject.h
  llvm/lib/BinaryFormat/Dwarf.cpp
  llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
  llvm/lib/DebugInfo/DWARF/DWARFDebugMacro.cpp
  llvm/test/DebugInfo/X86/debug-macro-v5.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73086.248686.patch
Type: text/x-patch
Size: 22866 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200306/76ba1636/attachment.bin>


More information about the llvm-commits mailing list