]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite] Use gdb_load in gdb.rocm/break-kernel-no-debug-info.exp
authorLancelot SIX <lancelot.six@amd.com>
Mon, 1 Dec 2025 14:29:52 +0000 (14:29 +0000)
committerLancelot SIX <lancelot.six@amd.com>
Fri, 5 Dec 2025 10:28:13 +0000 (10:28 +0000)
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 <tom@tromey.com>
gdb/testsuite/gdb.rocm/break-kernel-no-debug-info.exp

index 7773ff31ff0f2736caef85619a1659b337564b09..71c67adbcd655bfed8d19e4e89fc4a3e9acd79d0 100644 (file)
@@ -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