[DebugInfo] Fix reading location tables of v5 units in DWP.
authorIgor Kudrin <ikudrin@accesssoftek.com>
Fri, 20 Mar 2020 16:33:19 +0000 (23:33 +0700)
committerIgor Kudrin <ikudrin@accesssoftek.com>
Mon, 6 Apr 2020 06:28:06 +0000 (13:28 +0700)
commit49737df7679347aea59d891e82350a057f1a03c7
tree858a3a669d0c251a626b8df6a3af54a3603fde4c
parent714324b79ae2d05bedfbbb061cfbff4645e6e01b
[DebugInfo] Fix reading location tables of v5 units in DWP.

Without the patch, all version 5 compile units in a DWP file read
location tables from the beginning of a .debug_loclists.dwo section.
The patch fixes that by adjusting the reading offset the same way as
for pre-v5 units. The section identifier to find the contribution
entry corresponds to the version of the unit.

Differential revision: https://reviews.llvm.org/D77145
llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
llvm/test/DebugInfo/X86/dwp-v2-loc.s [new file with mode: 0644]
llvm/test/DebugInfo/X86/dwp-v5-loclists.s [new file with mode: 0644]