From: Tom de Vries Date: Fri, 12 Sep 2025 13:04:50 +0000 (+0200) Subject: [gdb/testsuite, tclint] Fix gdb.rust X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=78cda7389ca08070201a60cef7ef98b3b08d70c6;p=thirdparty%2Fbinutils-gdb.git [gdb/testsuite, tclint] Fix gdb.rust 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. --- diff --git a/gdb/testsuite/gdb.rust/modules.exp b/gdb/testsuite/gdb.rust/modules.exp index 5b2e998dba1..0874db3056d 100644 --- a/gdb/testsuite/gdb.rust/modules.exp +++ b/gdb/testsuite/gdb.rust/modules.exp @@ -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" diff --git a/gdb/testsuite/gdb.rust/traits.exp b/gdb/testsuite/gdb.rust/traits.exp index e5ef01554a2..82fc894febe 100644 --- a/gdb/testsuite/gdb.rust/traits.exp +++ b/gdb/testsuite/gdb.rust/traits.exp @@ -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