[PATCH] D155723: [DWARFVerifier] Allow simplified template names in debug_name

Felipe de Azevedo Piovezan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 19 09:25:28 PDT 2023


fdeazeve created this revision.
fdeazeve added reviewers: aprantl, dblaikie, avl, Michael137, JDevlieghere.
Herald added a subscriber: hiraditya.
Herald added a project: All.
fdeazeve requested review of this revision.
Herald added subscribers: llvm-commits, wangpc.
Herald added a project: LLVM.

LLDB can benefit from having the base name of functions (i.e. without any
template parameters), as an entry into accelerator tables pointing back in the
DIE for the corresponding function specialization. In fact, some LLDB
functionality is only possible when those entries are present.

The DWARFLinker has been adding such entries for a while now, both with
apple_names and with debug_names. However, this has two side effects:

1. Some LLDB functionality is only possible when dsym bundles are present (i.e.

the linker touched the debug info).

2. The DWARFVerifier doesn't accept debug_name sections created by the linker,

as such names are (usually) neither the AT_name nor the AT_linkage_name of the
DIE.

Based on recent discussion [1], and because the DWARF 5 spec says that:

> A producer may choose to implement additional rules for what names are placed
> in the index

This patch relaxes the checks on the verifier to allow for simplified template
names in the accelerator table. To do so, we move some helper functions from
DWARFLinker into the core lib debug info. This addresses the point 2) above.

This patch also enables addressing point 1) in the future, since the helper
function is now visible to other parts of LLVM.

[1]: https://github.com/llvm/llvm-project/issues/58362


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D155723

Files:
  llvm/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h
  llvm/lib/DWARFLinker/DWARFLinker.cpp
  llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp
  llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
  llvm/test/tools/dsymutil/X86/dwarf5-accel.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155723.542070.patch
Type: text/x-patch
Size: 7122 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230719/933d20ac/attachment.bin>


More information about the llvm-commits mailing list