[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
Sat Mar 7 05:07:06 PST 2020


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

Addressing comments by @probinson . Thanks! for comments.
This approach using `Context.getMaxVersion` for distinguishing between macro/macinfo will not work for case of multiple CU's because in that case `MaxVersion` will be 5, even in a CU with version 4 is present. So I changed the approach for distinguishing macro/macinfo while parsing/dumping by introducing `SectionName` String argument in `DwarfDebugMacro` parse/dump functions resultant code is much cleaner/readable. -- Now this implementation is able to parse a mixed object having macro(v5) and macinfo(v4 ) section.
-Added test case for multiple CU containing macro/macinfo sections.

+ committed flags part in 498e37e786ea2632b1c8596ad2512c306b3c8f58 <https://reviews.llvm.org/rG498e37e786ea2632b1c8596ad2512c306b3c8f58>


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

https://reviews.llvm.org/D73086

Files:
  llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
  llvm/include/llvm/DebugInfo/DWARF/DWARFDebugMacro.h
  llvm/include/llvm/DebugInfo/DWARF/DWARFObject.h
  llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
  llvm/lib/DebugInfo/DWARF/DWARFDebugMacro.cpp
  llvm/test/DebugInfo/Inputs/dwarfdump-macro-macinfo.elf-x86_64
  llvm/test/DebugInfo/X86/debug-macro-v5.s
  llvm/test/DebugInfo/X86/dwarfdump-macro-macinfo.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73086.248925.patch
Type: text/x-patch
Size: 21721 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200307/6d64e5fe/attachment.bin>


More information about the llvm-commits mailing list