[lldb/DWARF] Switch to llvm location list parser
authorPavel Labath <pavel@labath.sk>
Fri, 22 Nov 2019 11:02:55 +0000 (12:02 +0100)
committerPavel Labath <pavel@labath.sk>
Mon, 9 Dec 2019 12:39:10 +0000 (13:39 +0100)
commit773b849c10a60171908ab1bd658a44b6b396f567
tree7d2466d581855bfe7c63bfa12e038b6cc9257cae
parent329008fdf1889c0554f7afbb426f829f98327c78
[lldb/DWARF] Switch to llvm location list parser

Summary:
This patch deletes the lldb location list parser and teaches the
DWARFExpression class to use the parser in llvm instead. I have
centralized all the places doing the parsing into a single
GetLocationExpression function.

In theory the the actual location list parsing should be covered by llvm
tests, and this glue code by our existing location list tests, but since
we don't have that many location list tests, I've tried to extend the
coverage a bit by adding some explicit dwarf5 loclist handling and a
test of the dumping code.

For DWARF4 location lists this should be NFC (modulo small differences
in error handling which should only show up on invalid inputs). In case
of DWARF5, this fixes various missing bits of functionality, most
notably, the lack of support for DW_LLE_offset_pair.

Reviewers: JDevlieghere, aprantl, clayborg

Subscribers: lldb-commits, dblaikie

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D71003
lldb/include/lldb/Expression/DWARFExpression.h
lldb/source/Expression/DWARFExpression.cpp
lldb/test/Shell/SymbolFile/DWARF/debug_loc.s