]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite, tclint] Fix gdb.rust
authorTom de Vries <tdevries@suse.de>
Fri, 12 Sep 2025 13:04:50 +0000 (15:04 +0200)
committerTom de Vries <tdevries@suse.de>
Fri, 12 Sep 2025 13:04:50 +0000 (15:04 +0200)
Running tclint on the test-cases in gdb.rust shows a few problems:
...
modules.exp:37:1: expected braced word or word without substitutions in \
  argument interpreted as expr [command-args]
traits.exp:28:13: expected braced word or word without substitutions in \
  argument interpreted as script [command-args]
...

Fix these.

Tested on aarch64-linux.

gdb/testsuite/gdb.rust/modules.exp
gdb/testsuite/gdb.rust/traits.exp

index 5b2e998dba1dc05fc6857e5fc375cb00e8d993b9..0874db3056d9fc8634909c334eeb2dd930120b03 100644 (file)
@@ -34,7 +34,7 @@ if {![runto ${srcfile}:$line]} {
 # https://github.com/rust-lang/rust/issues/33121
 # gdb_test "call f2()" "lambda f2"
 
-if ![target_info exists gdb,noinferiorio] {
+if { ![target_info exists gdb,noinferiorio] } {
     gdb_test_stdio "call f3()" "mod1::inner::innest::f3"
     gdb_test_stdio "call self::f2()" "mod1::inner::innest::f2"
     gdb_test_stdio "call self::super::f2()" "mod1::inner::f2"
index e5ef01554a2b8262748a6055db8ea46acf5df2bb..82fc894febec3b87e418fe886a63af76f7b233f4 100644 (file)
@@ -25,7 +25,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
 }
 
 set readelf_program [gdb_find_readelf]
-set result [catch "exec $readelf_program --debug-dump=info $binfile" output]
+set result [catch {exec $readelf_program --debug-dump=info $binfile} output]
 if {$result != 0} {
     untested "could not read [file tail ${binfile}] with readelf"
     return