Bug 27374 - [dwz, dwarf5] .debug_names support
Summary: [dwz, dwarf5] .debug_names support
Status: NEW
Alias: None
Product: dwz
Classification: Unclassified
Component: default (show other bugs)
Version: unspecified
: P2 enhancement
Target Milestone: ---
Assignee: Nobody
URL:
Keywords:
Depends on: 24820
Blocks: 24726
  Show dependency treegraph
 
Reported: 2021-02-08 13:07 UTC by Tom de Vries
Modified: 2024-03-15 09:16 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom de Vries 2021-02-08 13:07:39 UTC
Currently not supported:
...
$ gcc -gdwarf-5 ../src/testsuite/dwz.tests/hello.c 
$ gdb-add-index -dwarf-5 a.out
$ cp a.out 1; ./dwz 1
./dwz: 1: Unknown debugging section .debug_names
...
Comment 1 Mark Wielaard 2021-02-19 11:36:04 UTC
This will need coordination with the rest of the GNU Toolchain, in particular GDB, which uses .gdb_index (which dwz does support). The .debug_names that gdb-add-index -dwarf-5 generates seems incomplete (https://www.sourceware.org/bugzilla/show_bug.cgi?id=24820) and it might need some extensions (in DWARF6?) to be generated properly.
Comment 2 Tom Tromey 2024-02-09 19:58:50 UTC
FWIW I'd recommend simply making the index after running dwz.

However, if you really want to have dwz understand how to make
an index, you should be aware of gdb extensions:

https://sourceware.org/gdb/current/onlinedocs/gdb.html/Debug-Names.html#Debug-Names

There will be more of these, I think -- actually to handle
dwz we need some.

Also, gdb does producer-sniffing and rejects most indexes,
so probably it will also need a patch if dwz gains this capability.