gdb doesn't handle DW_FORM_ref_sup*. There was a thread about this: https://sourceware.org/pipermail/gdb-patches/2021-February/176508.html ... that I totally forgot about. These forms can be used by dwz in its DWARF 5 mode. See https://sourceware.org/bugzilla/show_bug.cgi?id=27440
I'll probably update my patch but I wanted to note that I should look at whether BFD helps now: https://sourceware.org/pipermail/gdb-patches/2021-February/176584.html
(In reply to Tom Tromey from comment #1) > I'll probably update my patch but I wanted to note that > I should look at whether BFD helps now: > https://sourceware.org/pipermail/gdb-patches/2021-February/176584.html The support code was added in binutils, so nothing there for gdb to use.
https://sourceware.org/pipermail/gdb-patches/2025-March/216601.html
The master branch has been updated by Tom Tromey <tromey@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7b80401da008375af1e7cc154fb8163aa406f13d commit 7b80401da008375af1e7cc154fb8163aa406f13d Author: Tom Tromey <tom@tromey.com> Date: Wed Mar 19 14:47:29 2025 -0600 Handle DWARF 5 separate debug sections DWARF 5 standardized the .gnu_debugaltlink section that dwz emits in multi-file mode. This is handled via some new forms, and a new .debug_sup section. This patch adds support for this to gdb. It is largely straightforward, I think, though one oddity is that I chose not to have this code search the system build-id directories for the supplementary file. My feeling was that, while it makes sense for a distro to unify the build-id concept with the hash stored in the .debug_sup section, there's no intrinsic need to do so. This in turn means that a few tests -- for example those that test the index cache -- will not work in this mode. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32808 Acked-By: Simon Marchi <simon.marchi@efficios.com>
The master branch has been updated by Tom Tromey <tromey@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d43070861f5e6e890b6d1dcbe4c4d0354fa20b75 commit d43070861f5e6e890b6d1dcbe4c4d0354fa20b75 Author: Tom Tromey <tom@tromey.com> Date: Sun Mar 23 10:21:25 2025 -0600 Add "-5" flag to cc-with-tweaks This adds a "-5" flag to cc-with-tweaks, mirroring dwz's "-5" flag, and also adds a new cc-with-dwz-5 target board. The "-5" flag tells dwz to use the DWARF 5 .debug_sup section in multi-file mode. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32808
Fixed.