[PATCH] D78500: [DWARF5]:Added support for .debug_macro.dwo section in llvm-dwarfdump

Sourabh Singh Tomar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 20 09:10:33 PDT 2020


SouraVX created this revision.
SouraVX added reviewers: dblaikie, aprantl, jini.susan.george.
SouraVX added projects: debug-info, LLVM.
Herald added subscribers: llvm-commits, hiraditya.
SouraVX marked an inline comment as done.
SouraVX added inline comments.


================
Comment at: llvm/test/DebugInfo/X86/debug-macro-dwo.s:59
+	.long	65
+	.section	.debug_info.dwo,"e", at progbits
+	.long	.Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit
----------------
Primary reason why this test case contains `debug_info` and other sections too, because `llvm-dwarfdump` , as of now, uses DWARF version number present in Header to distinguish between version 5 `debug_str_offsets.dwo` and pre-standardized str_offset section. 
As a result if we try to reduce this test case to minimal, then we'll end up parsing the contents incorrectly.


This patch extends the parsing and dumping support of llvm-dwarfdump for `debug_macro.dwo`.  Since relocation's are not allowed in a `dwo` object , hence following forms are supported in this implementation -

- DW_MACRO_define
- DW_MACRO_undef
- DW_MACRO_start_file
- DW_MACRO_end_file
- DW_MACRO_define_strx  -- new in DWARFv5
- DW_MACRO_undef_strx   -- new in DWARFv5


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D78500

Files:
  llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
  llvm/include/llvm/DebugInfo/DWARF/DWARFDebugMacro.h
  llvm/include/llvm/DebugInfo/DWARF/DWARFObject.h
  llvm/include/llvm/MC/MCObjectFileInfo.h
  llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
  llvm/lib/DebugInfo/DWARF/DWARFDebugMacro.cpp
  llvm/lib/MC/MCObjectFileInfo.cpp
  llvm/test/DebugInfo/X86/debug-macro-dwo.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78500.258758.patch
Type: text/x-patch
Size: 13414 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200420/1f9ddbd3/attachment.bin>


More information about the llvm-commits mailing list