[Lldb-commits] [PATCH] D62246: DWARF: Implement DW_AT_signature lookup for type unit support

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed May 22 04:35:05 PDT 2019


labath created this revision.
labath added reviewers: clayborg, JDevlieghere, aprantl.
Herald added a subscriber: mgrang.
Herald added a reviewer: alexshap.
labath added a subscriber: jankratochvil.

This patch implements the main feature of type units. When completing a
type, if we encounter a DW_AT_signature attribute, we use it's value to
lookup the complete definition of the type in the relevant type unit.

To enable this lookup, we build up a map of all type units in a symbol
file when parsing the units. Then we consult this map when resolving the
DW_AT_signature attribute.

I include add a couple of tests which exercise the type lookup feature,
including one that ensure we do something reasonable in case we fail to
lookup the type.

A lot of the ideas in this patch have been taken from D32167 <https://reviews.llvm.org/D32167> and D61505 <https://reviews.llvm.org/D61505>.


https://reviews.llvm.org/D62246

Files:
  lit/SymbolFile/DWARF/Inputs/debug-types-basic.cpp
  lit/SymbolFile/DWARF/Inputs/debug-types-expressions.cpp
  lit/SymbolFile/DWARF/debug-types-basic.test
  lit/SymbolFile/DWARF/debug-types-expressions.test
  lit/SymbolFile/DWARF/debug-types-missing-signature.test
  source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
  source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
  source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h
  source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
  source/Plugins/SymbolFile/DWARF/DWARFTypeUnit.cpp
  source/Plugins/SymbolFile/DWARF/DWARFTypeUnit.h
  source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
  source/Plugins/SymbolFile/DWARF/DWARFUnit.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62246.200703.patch
Type: text/x-patch
Size: 13058 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190522/6a6ad1e5/attachment-0001.bin>


More information about the lldb-commits mailing list