[PATCH] D70880: [DWARF5][Debuginfo] Not matching compilation unit type (DW_UT_skeleton) and root DIE (DW_TAG_compile_unit)

Alexey Lapshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 1 14:23:30 PST 2019


avl created this revision.
avl added reviewers: probinson, dblaikie, aprantl.
avl added projects: LLVM, debug-info.
Herald added a subscriber: hiraditya.

That patch fixes "incompatible compilation unit type (DW_UT_skeleton) and root DIE (DW_TAG_compile_unit)" error.

cat split-dwarf.cpp

int main()
{
int a = 1;
return 0;
}

clang++ -O -g -gsplit-dwarf -gdwarf-5 split-dwarf.cpp; llvm-dwarfdump --verify ./a.out | grep skeleton

error: Compilation unit type (DW_UT_skeleton) and root DIE (DW_TAG_compile_unit) do not match.

According to "3.1.2 Skeleton Compilation Unit Entries" part of "DWARF Debugging Information Format Version 5"
: "When generating a split DWARF object file (see Section 7.3.2 on page 187), the
compilation unit in the .debug_info section is a "skeleton" compilation unit with
the tag DW_TAG_skeleton_unit".

The fix is to change DW_TAG_compile_unit into DW_TAG_skeleton_unit tag when skeleton file is generated.


https://reviews.llvm.org/D70880

Files:
  llvm/lib/CodeGen/AsmPrinter/DIE.cpp
  llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
  llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp
  llvm/lib/CodeGen/AsmPrinter/DwarfFile.h
  llvm/test/CodeGen/X86/dwarf-headers.ll
  llvm/test/DebugInfo/X86/debug_addr.ll
  llvm/test/DebugInfo/X86/string-offsets-table-order.ll
  llvm/test/DebugInfo/X86/string-offsets-table.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70880.231624.patch
Type: text/x-patch
Size: 6969 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191201/d42fbd37/attachment.bin>


More information about the llvm-commits mailing list