[Lldb-commits] [PATCH] D40475: DWZ 12/12: DWZ test mode

Jan Kratochvil via lldb-commits lldb-commits at lists.llvm.org
Fri Dec 1 04:14:09 PST 2017

On Fri, 01 Dec 2017 13:02:42 +0100, Pavel Labath wrote:
> > I expect because LLDB does not have any Linux DWARF index support, it has
> > only some Apple OSX index support. GDB's `.debug_index` is not usable for
> > LLDB as it does not contain DIE offsets. I would like to implement DWARF-5
> > `.debug_names` for it later.
> Well... missing dwarf index can make things slower, as we will have to
> index things ourselves, but it should not make us hang. (That's not
> say .debug_index support would not be a great feature to have).

FYI the GDB one is `.gdb_index`, I made a typo. But it is not usable for LLDB
as LLDB needs also DIE offsets; GDB expands whole CUs.

DWARF-5 '.debug_names' producer could be even ported from GDB to LLDB
	[PATCH v3 0/5] DWARF-5: .debug_names index
although the consumer is too GDB-specific, LLDB would need its own one.

Although then it would be better==faster to produce per-CU index already by
compiler and a linker could just merge them.  In Fedora people use gold now
for C++ as GNU ld is unusable from performance point of view.  gold can also
generate .gdb_index on its own but it has to index all the CUs as there is no
per-CU index provided by GCC (or clang?).

0m 5.389s -fuse-ld=gold -Wl,--gdb-index,--build-id
0m 3.564s -fuse-ld=gold             -Wl,--build-id
   1.825s = --gdb-index part of gold
0m19.401s (GNU ld)                  -Wl,--build-id
0m 4.364s gdb-add-index
  23.765s = GNU ld + gdb-add-index

But then I see lld already supports even -gdb-index.  Any updates about LLVM
DWARF index plan is welcome.


More information about the lldb-commits mailing list