On Debian 12, I see: (gdb) run Starting program: /home/smarchi/build/binutils-gdb/gdb/testsuite/outputs/gdb.base/list-nodebug/list-nodebug warning: amd-dbgapi: unable to enable GPU debugging due to a restriction error [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Breakpoint 1, 0x000055555555512d in main () (gdb) list . No symbol table is loaded. Use the "file" command. (gdb) FAIL: gdb.base/list-nodebug.exp: first 'list .' list . No symbol table is loaded. Use the "file" command. (gdb) FAIL: gdb.base/list-nodebug.exp: second 'list .'
My guess is that this can be fixed by using two source files, one with debug info and one without.
Created attachment 15410 [details] tentative patch
https://sourceware.org/pipermail/gdb-patches/2024-March/207312.html
The master branch has been updated by Tom de Vries <vries@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=42db3e48c5532a6a4aa3952e0a3d02f3dfac6f0a commit 42db3e48c5532a6a4aa3952e0a3d02f3dfac6f0a Author: Tom de Vries <tdevries@suse.de> Date: Sun Mar 17 16:48:43 2024 +0100 [gdb/testsuite] Fix gdb.base/list-no-debug.exp on debian On debian 12, aarch64-linux I run into: ... (gdb) list .^M No symbol table is loaded. Use the "file" command.^M (gdb) FAIL: gdb.base/list-nodebug.exp: first 'list .' ... The test-case expects some debug info, but none for main. Instead, there's no debug info at all. Fix this by adding another source file to the test-case, and compiling it with debug info. Tested on aarch64-linux. Approved-By: Andrew Burgess <aburgess@redhat.com> PR testsuite/31290 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31290
Fixed.