[PATCH] D49420: [DebugInfo] Generate .debug_names section when it makes sense

Pavel Labath via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 17 05:28:14 PDT 2018


labath created this revision.
labath added reviewers: JDevlieghere, aprantl, dblaikie, echristo, probinson.

This patch makes us generate the debug_names section in response to some
user-facing commands (previously it was only generated if explicitly
selected via the -accel-tables option).

My goal was to make this work for DWARF>=5 (as it's an official part of
that standard), and also, as an extension, for DWARF<5 if one is
explicitly tuning for lldb as a debugger (because it brings a large
performance improvement there).

This is slightly complicated by the fact that the debug_names tables are
incompatible with the DWARF v4 type units (they assume that the type
units are in the debug_info section), and unfortunately, right now we
generate DWARF v4-style type units even for -gdwarf-5. For this reason,
I disable all accelerator tables if the user requested type unit
generation. I do this even for apple tables, as they have the same
problem (in fact generating type units for apple targets makes us crash
even before we get around to emitting the accelerator tables).


Repository:
  rL LLVM

https://reviews.llvm.org/D49420

Files:
  lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  lib/CodeGen/AsmPrinter/DwarfDebug.h
  lib/CodeGen/AsmPrinter/DwarfUnit.cpp
  test/DebugInfo/X86/accel-tables-dwarf5.ll
  test/DebugInfo/X86/accel-tables.ll
  test/DebugInfo/X86/string-offsets-table.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49420.155857.patch
Type: text/x-patch
Size: 11113 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180717/4d87fc3d/attachment.bin>


More information about the llvm-commits mailing list