From: Lancelot SIX Date: Mon, 1 Dec 2025 14:29:52 +0000 (+0000) Subject: [gdb/testsuite] Use gdb_load in gdb.rocm/break-kernel-no-debug-info.exp X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=89525e4ffdf79caefd146dcff8ecd801af7576ae;p=thirdparty%2Fbinutils-gdb.git [gdb/testsuite] Use gdb_load in gdb.rocm/break-kernel-no-debug-info.exp The gdb.rocm/break-kernel-no-debug-info.exp builds a testcase without debug info, and loads the binary in GDB with: gdb_test "file $::binfile" ".*No debugging symbols.*" "load file" On some configurations (SLES with glibc-devel installed), the compiler links /usr/lib64/crit1.o (which contains some debug information) into the final binary. As a result, the binary contains "some" debug information, which makes the above pattern fail. The testcase is still valid as we only really need the GPU code object (embedded in the main binary) to not contain debug information, so this patch proposes to relax this first step by using "gdb_load" instead. Tested on x86_64-linux + AMDGPU gfx1031. Change-Id: Id903f62e170af69c001b39f4681602a54e2fdaf1 Approved-By: Tom Tromey --- diff --git a/gdb/testsuite/gdb.rocm/break-kernel-no-debug-info.exp b/gdb/testsuite/gdb.rocm/break-kernel-no-debug-info.exp index 7773ff31ff0..71c67adbcd6 100644 --- a/gdb/testsuite/gdb.rocm/break-kernel-no-debug-info.exp +++ b/gdb/testsuite/gdb.rocm/break-kernel-no-debug-info.exp @@ -35,7 +35,7 @@ if {[build_executable "failed to prepare" $testfile $srcfile {hip nodebug}]} { clean_restart with_rocm_gpu_lock { - gdb_test "file $::binfile" ".*No debugging symbols.*" "load file" + gdb_load $::binfile if {![runto_main]} { return