[PATCH] D52241: Eliminate .{, z}debug_gnu_pub{names, types} sections as early as possible.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 1 16:26:37 PDT 2018


MaskRay accepted this revision.
MaskRay added a comment.
This revision is now accepted and ready to land.

The gdb command `save gdb-index` can produce `symbol-file.gdb-index`, but it seems it does not need `.debug_gnu_pub{names,types}`

https://sourceware.org/git/?p=binutils-gdb.git;a=blob;hb=7235dd9f9092d719121a635f73ae2c72102f0263;f=gdb/dwarf-index-write.c#l1715

In the binutils-gdb repo:

  % rg -l debug_gnu_pubnames
  gold/ChangeLog-0815
  binutils/dwarf.c
  binutils/ChangeLog-2013
  gold/testsuite/dwp_test_1.s
  gold/testsuite/dwp_test_1b.s
  gold/testsuite/dwp_test_main.s
  gold/testsuite/dwp_test_2.s
  binutils/doc/debug.options.texi
  debug/binutils/doc/objdump.1
  debug/binutils/doc/readelf.1
  gdb/testsuite/gdb.dwarf2/fission-loclists-pie.S
  gdb/testsuite/gdb.dwarf2/fission-base.S
  gdb/testsuite/gdb.dwarf2/fission-loclists.S

The three gdb tests mention `.debug_gnu_pubnames` just because they are created by `-gsplit-dwarf`, not because that gdb itself does anything with them.

This looks fine. For extra safeguard you may ask if `.debug_gnu_pubnames` is useful on the gdb mailing list gdb at sourceware.org


https://reviews.llvm.org/D52241





More information about the llvm-commits mailing list