(64-bit chroot) catbus ~/build-id # cat t.c #include <stdio.h> int main(void) { printf("hello world\n"); return 0; } (64-bit chroot) catbus ~/build-id # gcc t.c -o t (64-bit chroot) catbus ~/build-id # gdb -q t Reading symbols from t... (No debugging symbols found in t) (gdb) start Temporary breakpoint 1 at 0x7a4 Starting program: /root/build-id/t Temporary breakpoint 1, 0x00000100000007a4 in main () (gdb) info sharedlibrary Cannot access memory at address 0xfff80001002011e0 Cannot access memory at address 0xfff80001002011d8 From To Syms Read Shared Object Library 0xfff80001000010a0 0xfff8000100021f80 Yes (*) /lib64/ld-linux.so.2 (*): Shared library is missing debugging information. The result is that trying to debug anything in a shared library is broken. Things work fine on sparc32: (32-bit chroot) catbus ~ # gdb -q t Reading symbols from t... (No debugging symbols found in t) (gdb) start Temporary breakpoint 1 at 0x5e4 Starting program: /root/t [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/libthread_db.so.1". Temporary breakpoint 1, 0x700005e4 in main () (gdb) info sharedlibrary From To Syms Read Shared Object Library 0xf7fbcc40 0xf7fded80 Yes (*) /lib/ld-linux.so.2 0xf7e02e00 0xf7f6a8c0 Yes (*) /lib/libc.so.6 (*): Shared library is missing debugging information.
Patch has now been sent for review: https://inbox.sourceware.org/gdb-patches/20230705134141.1441753-1-pedro@palves.net/T/#u
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e89cad361658a86b982a13ceec01514d36011ed0 commit e89cad361658a86b982a13ceec01514d36011ed0 Author: Sam James <sam@gentoo.org> AuthorDate: 2023-07-06 17:15:17 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-07-06 17:15:38 +0000 sys-devel/gdb: fix runtime debugging on sparc Closes: https://bugs.gentoo.org/907906 Signed-off-by: Sam James <sam@gentoo.org> .../gdb/files/gdb-13.2-fix-sparc-debugging.patch | 126 +++++++++ sys-devel/gdb/gdb-13.2-r1.ebuild | 313 +++++++++++++++++++++ 2 files changed, 439 insertions(+)