[DebugInfo] Support DWARFv5 index sections.
authorIgor Kudrin <ikudrin@accesssoftek.com>
Fri, 20 Mar 2020 16:26:56 +0000 (23:26 +0700)
committerIgor Kudrin <ikudrin@accesssoftek.com>
Mon, 6 Apr 2020 06:28:06 +0000 (13:28 +0700)
commit714324b79ae2d05bedfbbb061cfbff4645e6e01b
treeea97c398b47f8ed1686469d0727ea3927b200640
parenta0249fe91c7ba0dabf0e8789171fb4aea5fca1cb
[DebugInfo] Support DWARFv5 index sections.

DWARFv5 defines index sections in package files in a slightly different
way than the pre-standard GNU proposal, see Section 7.3.5 in the DWARF
standard and https://gcc.gnu.org/wiki/DebugFissionDWP for GNU proposal.
The main concern here is values for section identifiers, which are
partially overlapped with changed meanings. The patch adds support for
v5 index sections and resolves that difficulty by defining a set of
identifiers for internal use which can represent and distinct values
of both standards.

Differential Revision: https://reviews.llvm.org/D75929
llvm/include/llvm/BinaryFormat/Dwarf.def
llvm/include/llvm/DebugInfo/DWARF/DWARFUnitIndex.h
llvm/lib/DebugInfo/DWARF/DWARFUnitIndex.cpp
llvm/test/DebugInfo/X86/dwp-v2-cu-index.s [new file with mode: 0644]
llvm/test/DebugInfo/X86/dwp-v2-tu-index.s [new file with mode: 0644]
llvm/test/DebugInfo/X86/dwp-v5-cu-index.s [new file with mode: 0644]
llvm/test/DebugInfo/X86/dwp-v5-tu-index.s [new file with mode: 0644]
llvm/tools/llvm-dwp/llvm-dwp.cpp