[all-commits] [llvm/llvm-project] 089c0f: [DWARF] Add an api to get "interpreted" location l...
Pavel Labath via All-commits
all-commits at lists.llvm.org
Wed Nov 20 04:27:04 PST 2019
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 089c0f581492cd6e2a3d2927be3fbf60ea2d7e62
https://github.com/llvm/llvm-project/commit/089c0f581492cd6e2a3d2927be3fbf60ea2d7e62
Author: Pavel Labath <pavel at labath.sk>
Date: 2019-11-20 (Wed, 20 Nov 2019)
Changed paths:
M llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h
M llvm/include/llvm/DebugInfo/DWARF/DWARFDie.h
M llvm/include/llvm/DebugInfo/DWARF/DWARFLocationExpression.h
M llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h
M llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
M llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
M llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
M llvm/lib/ObjectYAML/DWARFEmitter.cpp
M llvm/unittests/DebugInfo/DWARF/CMakeLists.txt
A llvm/unittests/DebugInfo/DWARF/DWARFDieTest.cpp
Log Message:
-----------
[DWARF] Add an api to get "interpreted" location lists
Summary:
This patch adds DWARFDie::getLocations, which returns the location
expressions for a given attribute (typically DW_AT_location). It handles
both "inline" locations and references to the external location list
sections (currently only of the DW_FORM_sec_offset type). It is
implemented on top of DWARFUnit::findLoclistFromOffset, which is also
added in this patch. I tried to make their signatures similar to the
equivalent range list functionality.
The actual location list interpretation logic is in
DWARFLocationTable::visitAbsoluteLocationList. This part is not
equivalent to the range list code, but this deviation is motivated by a
desire to reuse the same location list parsing code within lldb.
The functionality is tested via a c++ unit test of the DWARFDie API.
Reviewers: dblaikie, JDevlieghere, SouraVX
Subscribers: mgorny, hiraditya, cmtice, probinson, llvm-commits, aprantl
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70394
More information about the All-commits
mailing list