[PATCH] D42765: [DebugInfo] Support DWARFv5 source code embedding extension

Scott Linder via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 23 08:03:14 PST 2018


scott.linder updated this revision to Diff 135640.
scott.linder added a comment.
Herald added subscribers: javed.absar, mehdi_amini.
Herald added a reviewer: JDevlieghere.

The latest diff has a few changes:

- Add support for writing the source text to the `.debug_line_str` section, rather than inline in the `.debug_line` (using the recent work done by Paul Robinson).
- Require source text be present in all entries of a line table, or none of them, the same as with MD5. This removes the need for the `DW_LNCT_has_source` flag, which is removed.
- Add an `LLVM_` prefix to the new content type, and confirm the encoding is not in use by GCC.
- Modify the format of `file_names` in `llvm-dwarfdump` to accommodate this patch and future changes. The new format places each column on a new line, so it can naturally accommodate new content types, even when they are variable length. Along with this, I updated the display of the `.debug_line_str` section to quote and escape its contents to prevent interpreting characters like newlines. Affected tests are updated.
- Remove C-API update.
- Update metadata unit test.

There is still an outstanding comment about making a struct variable-length, but I am still not clear what that entails. I believe all other feedback from the previous version of the patch has now been addressed.


https://reviews.llvm.org/D42765

Files:
  docs/AMDGPUUsage.rst
  include/llvm/BinaryFormat/Dwarf.def
  include/llvm/DebugInfo/DIContext.h
  include/llvm/DebugInfo/DWARF/DWARFDebugLine.h
  include/llvm/IR/DIBuilder.h
  include/llvm/IR/DebugInfoMetadata.h
  include/llvm/MC/MCContext.h
  include/llvm/MC/MCDwarf.h
  include/llvm/MC/MCStreamer.h
  lib/AsmParser/LLParser.cpp
  lib/Bitcode/Reader/MetadataLoader.cpp
  lib/Bitcode/Writer/BitcodeWriter.cpp
  lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
  lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  lib/CodeGen/AsmPrinter/DwarfUnit.cpp
  lib/DebugInfo/DWARF/DWARFContext.cpp
  lib/DebugInfo/DWARF/DWARFDebugLine.cpp
  lib/IR/AsmWriter.cpp
  lib/IR/DIBuilder.cpp
  lib/IR/DebugInfo.cpp
  lib/IR/DebugInfoMetadata.cpp
  lib/IR/LLVMContextImpl.h
  lib/MC/MCAsmStreamer.cpp
  lib/MC/MCContext.cpp
  lib/MC/MCDwarf.cpp
  lib/MC/MCParser/AsmParser.cpp
  lib/MC/MCStreamer.cpp
  test/Assembler/debug-info.ll
  test/Bitcode/metadata-source.ll
  test/Bitcode/metadata-source.ll.bc
  test/CodeGen/BPF/dwarfdump.ll
  test/CodeGen/Generic/dwarf-md5.ll
  test/CodeGen/Generic/dwarf-source.ll
  test/CodeGen/X86/dwarf-comp-dir.ll
  test/DebugInfo/AMDGPU/dwarfdump-relocs.ll
  test/DebugInfo/Generic/lto-comp-dir.ll
  test/DebugInfo/X86/debug-macro.ll
  test/DebugInfo/X86/dwarfdump-header-64.s
  test/DebugInfo/X86/dwarfdump-header.s
  test/DebugInfo/X86/dwarfdump-line-dwo.s
  test/DebugInfo/X86/dwarfdump-line-only.s
  test/DebugInfo/X86/generate-odr-hash.ll
  test/DebugInfo/X86/stmt-list-multiple-compile-units.ll
  test/DebugInfo/debugmacinfo.test
  test/Linker/Inputs/metadata-source-a.ll
  test/Linker/Inputs/metadata-source-b.ll
  test/Linker/metadata-source.ll
  test/Linker/subprogram-linkonce-weak.ll
  test/MC/ARM/dwarf-asm-multiple-sections.s
  test/MC/AsmParser/debug-empty-source.s
  test/MC/AsmParser/debug-no-source.s
  test/MC/ELF/debug-file-options.s
  test/MC/ELF/debug-md5.s
  test/MC/ELF/debug-source.s
  test/MC/MachO/gen-dwarf-cpp.s
  test/MC/MachO/gen-dwarf-macro-cpp.s
  test/MC/MachO/gen-dwarf.s
  test/tools/dsymutil/X86/basic-linking-x86.test
  test/tools/dsymutil/X86/basic-lto-dw4-linking-x86.test
  test/tools/dsymutil/X86/basic-lto-linking-x86.test
  test/tools/llvm-objdump/Inputs/embedded-source
  test/tools/llvm-objdump/embedded-source.test
  tools/llvm-objdump/llvm-objdump.cpp
  unittests/IR/MetadataTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42765.135640.patch
Type: text/x-patch
Size: 91810 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180223/c9b43fd2/attachment-0001.bin>


More information about the llvm-commits mailing list