DWARF: Introduce DWARFTypeUnit class
authorPavel Labath <pavel@labath.sk>
Wed, 22 May 2019 09:09:39 +0000 (09:09 +0000)
committerPavel Labath <pavel@labath.sk>
Wed, 22 May 2019 09:09:39 +0000 (09:09 +0000)
commit80233daeaa0b778585c32b921679eb9d22e23ceb
treeadeeccc251bd60ffa8a08825a29dfef472e59c92
parentb72b091389f6027882c32f4181139cb6af56f9ea
DWARF: Introduce DWARFTypeUnit class

Summary:
This patch introduces the DWARFTypeUnit class, and teaches lldb to parse
type units out of both the debug_types section (DWARF v4), and from the
regular debug_info section (DWARF v5).

The most important piece of functionality - resolving DW_AT_signatures
to connect type forward declarations to their definitions - is not
implemented here, but even without that, a lot of functionality becomes
available. I've added tests for the commands that start to work after
this patch.

The changes in this patch were greatly inspired by D61505, which in turn took
over changes from D32167.

Reviewers: JDevlieghere, clayborg, aprantl

Subscribers: mgorny, jankratochvil, lldb-commits

Differential Revision: https://reviews.llvm.org/D62008

llvm-svn: 361360
15 files changed:
lldb/lit/SymbolFile/DWARF/Inputs/debug-types-basic.cpp [new file with mode: 0644]
lldb/lit/SymbolFile/DWARF/Inputs/debug-types-expressions.cpp [new file with mode: 0644]
lldb/lit/SymbolFile/DWARF/debug-types-basic.test [new file with mode: 0644]
lldb/lit/SymbolFile/DWARF/debug-types-expressions.test [new file with mode: 0644]
lldb/lit/SymbolFile/DWARF/lit.local.cfg
lldb/source/Plugins/SymbolFile/DWARF/CMakeLists.txt
lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h
lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.h
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFTypeUnit.cpp [new file with mode: 0644]
lldb/source/Plugins/SymbolFile/DWARF/DWARFTypeUnit.h [new file with mode: 0644]
lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp