[all-commits] [llvm/llvm-project] 2e7ee4: [DWARFVerifier] Allow simplified template names in...

Felipe de Azevedo Piovezan via All-commits all-commits at lists.llvm.org
Mon Aug 14 07:22:40 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2e7ee4dc21430b0fe4c9ee306dc1d8c7986a6646
      https://github.com/llvm/llvm-project/commit/2e7ee4dc21430b0fe4c9ee306dc1d8c7986a6646
  Author: Felipe de Azevedo Piovezan <fpiovezan at apple.com>
  Date:   2023-08-14 (Mon, 14 Aug 2023)

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

  Log Message:
  -----------
  [DWARFVerifier] Allow simplified template names in debug_name

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

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




More information about the All-commits mailing list