From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1726) id 2CBE7385800A; Mon, 28 Nov 2022 21:04:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2CBE7385800A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1669669495; bh=FO7hhczynmBII+uOhS4oalDmcsq4F1ryVCgjD5XfHCA=; h=From:To:Subject:Date:From; b=yqFZd8ZPNxYMnJgc3D6B5h/5ec5aaPVeoUuw/+JJUH9De9hNtbCJXfEs1Lco2RWPv yUQ7v2+cu1cIXz+vZAe7aO3lpZ/wKCO1F8G/Jx4eYlVm+ar7NPeAo4HTJ5kUdUsSf7 kpnzmxU0Rs6MTVik3KACfIiNzRbuPwafrRZAZkbU= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Andrew Burgess To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb/testsuite: remove use of then keyword from gdb.cp/*.exp X-Act-Checkin: binutils-gdb X-Git-Author: Andrew Burgess X-Git-Refname: refs/heads/master X-Git-Oldrev: 75b6f3866450afa1219ca986910619302f7effb7 X-Git-Newrev: 95701caeadd48415b3cb3d7fc7d9a4ef84211c55 Message-Id: <20221128210455.2CBE7385800A@sourceware.org> Date: Mon, 28 Nov 2022 21:04:55 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D95701caeadd4= 8415b3cb3d7fc7d9a4ef84211c55 commit 95701caeadd48415b3cb3d7fc7d9a4ef84211c55 Author: Andrew Burgess Date: Mon Nov 14 14:06:11 2022 +0000 gdb/testsuite: remove use of then keyword from gdb.cp/*.exp =20 The canonical form of 'if' in modern TCL is 'if {} {}'. But there's still a bunch of places in the testsuite where we make use of the 'then' keyword, and sometimes these get copies into new tests, which just spreads poor practice. =20 This commit removes all use of the 'then' keyword from the gdb.cp/ test script directory. =20 There should be no changes in what is tested after this commit. Diff: --- gdb/testsuite/gdb.cp/ambiguous.exp | 2 +- gdb/testsuite/gdb.cp/anon-union.exp | 2 +- gdb/testsuite/gdb.cp/breakpoint.exp | 2 +- gdb/testsuite/gdb.cp/bs15503.exp | 2 +- gdb/testsuite/gdb.cp/casts.exp | 4 ++-- gdb/testsuite/gdb.cp/class2.exp | 2 +- gdb/testsuite/gdb.cp/classes.exp | 2 +- gdb/testsuite/gdb.cp/converts.exp | 2 +- gdb/testsuite/gdb.cp/ctti.exp | 4 ++-- gdb/testsuite/gdb.cp/derivation.exp | 2 +- gdb/testsuite/gdb.cp/disasm-func-name.exp | 2 +- gdb/testsuite/gdb.cp/dispcxx.exp | 2 +- gdb/testsuite/gdb.cp/ena-dis-br-range.exp | 2 +- gdb/testsuite/gdb.cp/filename.exp | 2 +- gdb/testsuite/gdb.cp/fpointer.exp | 2 +- gdb/testsuite/gdb.cp/gdb1355.exp | 2 +- gdb/testsuite/gdb.cp/gdb2384.exp | 2 +- gdb/testsuite/gdb.cp/gdb2495.exp | 4 ++-- gdb/testsuite/gdb.cp/inherit.exp | 4 ++-- gdb/testsuite/gdb.cp/koenig.exp | 2 +- gdb/testsuite/gdb.cp/local-static.exp | 2 +- gdb/testsuite/gdb.cp/local.exp | 4 ++-- gdb/testsuite/gdb.cp/m-data.exp | 2 +- gdb/testsuite/gdb.cp/m-static.exp | 2 +- gdb/testsuite/gdb.cp/mb-ctor.exp | 2 +- gdb/testsuite/gdb.cp/member-name.exp | 2 +- gdb/testsuite/gdb.cp/member-ptr.exp | 2 +- gdb/testsuite/gdb.cp/method-call-in-c.exp | 2 +- gdb/testsuite/gdb.cp/method.exp | 2 +- gdb/testsuite/gdb.cp/namespace-nested-import.exp | 2 +- gdb/testsuite/gdb.cp/namespace.exp | 6 +++--- gdb/testsuite/gdb.cp/nextoverthrow.exp | 2 +- gdb/testsuite/gdb.cp/nsdecl.exp | 2 +- gdb/testsuite/gdb.cp/nsimport.exp | 2 +- gdb/testsuite/gdb.cp/nsnested.exp | 2 +- gdb/testsuite/gdb.cp/nsnoimports.exp | 2 +- gdb/testsuite/gdb.cp/nsrecurs.exp | 2 +- gdb/testsuite/gdb.cp/nsstress.exp | 2 +- gdb/testsuite/gdb.cp/nsusing.exp | 4 ++-- gdb/testsuite/gdb.cp/operator.exp | 2 +- gdb/testsuite/gdb.cp/oranking.exp | 2 +- gdb/testsuite/gdb.cp/overload.exp | 4 ++-- gdb/testsuite/gdb.cp/pr-1023.exp | 2 +- gdb/testsuite/gdb.cp/pr-1210.exp | 2 +- gdb/testsuite/gdb.cp/pr-574.exp | 2 +- gdb/testsuite/gdb.cp/pr10687.exp | 2 +- gdb/testsuite/gdb.cp/pr10728.exp | 2 +- gdb/testsuite/gdb.cp/pr12028.exp | 2 +- gdb/testsuite/gdb.cp/pr9067.exp | 2 +- gdb/testsuite/gdb.cp/pr9167.exp | 2 +- gdb/testsuite/gdb.cp/pr9631.exp | 2 +- gdb/testsuite/gdb.cp/printmethod.exp | 2 +- gdb/testsuite/gdb.cp/ptype-flags.exp | 2 +- gdb/testsuite/gdb.cp/ref-types.exp | 10 +++++----- gdb/testsuite/gdb.cp/rtti.exp | 2 +- gdb/testsuite/gdb.cp/rvalue-ref-types.exp | 2 +- gdb/testsuite/gdb.cp/shadow.exp | 2 +- gdb/testsuite/gdb.cp/smartp.exp | 2 +- gdb/testsuite/gdb.cp/try_catch.exp | 2 +- gdb/testsuite/gdb.cp/userdef.exp | 2 +- gdb/testsuite/gdb.cp/virtbase.exp | 2 +- gdb/testsuite/gdb.cp/virtbase2.exp | 2 +- gdb/testsuite/gdb.cp/virtfunc.exp | 2 +- gdb/testsuite/gdb.cp/virtfunc2.exp | 2 +- gdb/testsuite/gdb.cp/watch-cp.exp | 2 +- gdb/testsuite/gdb.cp/wide_char_types.exp | 2 +- 66 files changed, 79 insertions(+), 79 deletions(-) diff --git a/gdb/testsuite/gdb.cp/ambiguous.exp b/gdb/testsuite/gdb.cp/ambi= guous.exp index c6bc9a6df9f..0f04668cbab 100644 --- a/gdb/testsuite/gdb.cp/ambiguous.exp +++ b/gdb/testsuite/gdb.cp/ambiguous.exp @@ -36,7 +36,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile \ return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint" return } diff --git a/gdb/testsuite/gdb.cp/anon-union.exp b/gdb/testsuite/gdb.cp/ano= n-union.exp index e086bfb0f7e..9f18545bbf8 100644 --- a/gdb/testsuite/gdb.cp/anon-union.exp +++ b/gdb/testsuite/gdb.cp/anon-union.exp @@ -31,7 +31,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile {debug c++}]} { return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint" continue } diff --git a/gdb/testsuite/gdb.cp/breakpoint.exp b/gdb/testsuite/gdb.cp/bre= akpoint.exp index 1a0f946a481..e1f2d4c5dc5 100644 --- a/gdb/testsuite/gdb.cp/breakpoint.exp +++ b/gdb/testsuite/gdb.cp/breakpoint.exp @@ -32,7 +32,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile {debug c++}]} { proc test_breakpoint {name} { # Restart the program every time, so that a single failure doesn't # lead to a cascade. - if ![runto_main] then { + if {![runto_main]} { perror "couldn't run to main when testing ${name}" return -code continue } else { diff --git a/gdb/testsuite/gdb.cp/bs15503.exp b/gdb/testsuite/gdb.cp/bs1550= 3.exp index bf5e660a54d..f00421a6702 100644 --- a/gdb/testsuite/gdb.cp/bs15503.exp +++ b/gdb/testsuite/gdb.cp/bs15503.exp @@ -25,7 +25,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile {debug c++}]} { return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint" return } diff --git a/gdb/testsuite/gdb.cp/casts.exp b/gdb/testsuite/gdb.cp/casts.exp index 0f6460bd255..43851d43aeb 100644 --- a/gdb/testsuite/gdb.cp/casts.exp +++ b/gdb/testsuite/gdb.cp/casts.exp @@ -33,7 +33,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile {debug c++}]} { return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint" return } @@ -181,7 +181,7 @@ if {[prepare_for_testing "failed to prepare" ${testfile= }03 $srcfile2 \ return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint" return } diff --git a/gdb/testsuite/gdb.cp/class2.exp b/gdb/testsuite/gdb.cp/class2.= exp index cc192b6de64..9392e259be4 100644 --- a/gdb/testsuite/gdb.cp/class2.exp +++ b/gdb/testsuite/gdb.cp/class2.exp @@ -34,7 +34,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile $flags]} { gdb_test_no_output "set print object off" gdb_test_no_output "set print symbol off" =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to main" return } diff --git a/gdb/testsuite/gdb.cp/classes.exp b/gdb/testsuite/gdb.cp/classe= s.exp index 9a947754bb6..beac2681749 100644 --- a/gdb/testsuite/gdb.cp/classes.exp +++ b/gdb/testsuite/gdb.cp/classes.exp @@ -651,7 +651,7 @@ proc do_tests {} { gdb_test_no_output "set language c++" "" gdb_test_no_output "set width 0" "" =20 - if ![runto_main ] then { + if {![runto_main]} { perror "couldn't run to breakpoint" return } diff --git a/gdb/testsuite/gdb.cp/converts.exp b/gdb/testsuite/gdb.cp/conve= rts.exp index e4357fc924e..ea7a2f45d2f 100644 --- a/gdb/testsuite/gdb.cp/converts.exp +++ b/gdb/testsuite/gdb.cp/converts.exp @@ -21,7 +21,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile}= ${srcfile} {debug c++} =20 ############################################ =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint main" return } diff --git a/gdb/testsuite/gdb.cp/ctti.exp b/gdb/testsuite/gdb.cp/ctti.exp index 36b7d34c48b..4a2012e4a05 100644 --- a/gdb/testsuite/gdb.cp/ctti.exp +++ b/gdb/testsuite/gdb.cp/ctti.exp @@ -30,7 +30,7 @@ if {[prepare_for_testing "failed to prepare" $testfile \ return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint" return } @@ -45,7 +45,7 @@ gdb_test "print i" "\\$\[0-9\]+ =3D 4" # TODO: this needs more work before actually deploying it. # So bail out here. =20 -if { [ test_compiler_info gcc-*] } then { return } +if {[test_compiler_info gcc-*]} { return } =20 gdb_test_multiple "print add(2,2)" "print add(2,2)" { -re "\\$\[0-9\]+ =3D 4\r\n$gdb_prompt $" { diff --git a/gdb/testsuite/gdb.cp/derivation.exp b/gdb/testsuite/gdb.cp/der= ivation.exp index f49ab208ac9..f5d20a00a3f 100644 --- a/gdb/testsuite/gdb.cp/derivation.exp +++ b/gdb/testsuite/gdb.cp/derivation.exp @@ -55,7 +55,7 @@ with_test_prefix "before run" { =20 # Set it up at a breakpoint so we can play with the variable values. =20 -if ![runto 'marker1'] then { +if {![runto 'marker1']} { perror "couldn't run to marker1" return } diff --git a/gdb/testsuite/gdb.cp/disasm-func-name.exp b/gdb/testsuite/gdb.= cp/disasm-func-name.exp index 7d325fe567f..45f18abb4e6 100644 --- a/gdb/testsuite/gdb.cp/disasm-func-name.exp +++ b/gdb/testsuite/gdb.cp/disasm-func-name.exp @@ -27,7 +27,7 @@ if {[prepare_for_testing "failed to prepare" $testfile \ return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint" return } diff --git a/gdb/testsuite/gdb.cp/dispcxx.exp b/gdb/testsuite/gdb.cp/dispcx= x.exp index f82e5889321..9d2e340083f 100644 --- a/gdb/testsuite/gdb.cp/dispcxx.exp +++ b/gdb/testsuite/gdb.cp/dispcxx.exp @@ -21,7 +21,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile {debug c++}]} { return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to main" return }=20 diff --git a/gdb/testsuite/gdb.cp/ena-dis-br-range.exp b/gdb/testsuite/gdb.= cp/ena-dis-br-range.exp index 83c9838aa42..967d6b41c62 100644 --- a/gdb/testsuite/gdb.cp/ena-dis-br-range.exp +++ b/gdb/testsuite/gdb.cp/ena-dis-br-range.exp @@ -29,7 +29,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile {debug c++}]} { return -1 } =20 -if ![runto 'marker'] then { +if {![runto 'marker']} { return -1 } =20 diff --git a/gdb/testsuite/gdb.cp/filename.exp b/gdb/testsuite/gdb.cp/filen= ame.exp index 113c84d1905..6d97ee51257 100644 --- a/gdb/testsuite/gdb.cp/filename.exp +++ b/gdb/testsuite/gdb.cp/filename.exp @@ -21,7 +21,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile {debug c++}]} { return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to main" return } diff --git a/gdb/testsuite/gdb.cp/fpointer.exp b/gdb/testsuite/gdb.cp/fpoin= ter.exp index f2af2b94aca..5fc99055a2c 100644 --- a/gdb/testsuite/gdb.cp/fpointer.exp +++ b/gdb/testsuite/gdb.cp/fpointer.exp @@ -22,7 +22,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile}= ${srcfile} {debug c++} return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint main" return } diff --git a/gdb/testsuite/gdb.cp/gdb1355.exp b/gdb/testsuite/gdb.cp/gdb135= 5.exp index ecbf88f4bb9..e18bcc18f17 100644 --- a/gdb/testsuite/gdb.cp/gdb1355.exp +++ b/gdb/testsuite/gdb.cp/gdb1355.exp @@ -33,7 +33,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile {debug c++}]} { return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to main" return }=20 diff --git a/gdb/testsuite/gdb.cp/gdb2384.exp b/gdb/testsuite/gdb.cp/gdb238= 4.exp index 4181ab48119..7fc5a5ba0f8 100644 --- a/gdb/testsuite/gdb.cp/gdb2384.exp +++ b/gdb/testsuite/gdb.cp/gdb2384.exp @@ -38,7 +38,7 @@ clean_restart ${binfile} gdb_load_shlib ${sofile} =20 =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint" return -1 } diff --git a/gdb/testsuite/gdb.cp/gdb2495.exp b/gdb/testsuite/gdb.cp/gdb249= 5.exp index 1babf5e3322..6ade5d91d4e 100644 --- a/gdb/testsuite/gdb.cp/gdb2495.exp +++ b/gdb/testsuite/gdb.cp/gdb2495.exp @@ -51,7 +51,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile {debug c++}]} { return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to main" return } @@ -96,7 +96,7 @@ gdb_test "p exceptions.throw_function()" \ "call a function that raises an exception with unwinding off.." =20 # Restart the inferior back at main. -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to main" return } diff --git a/gdb/testsuite/gdb.cp/inherit.exp b/gdb/testsuite/gdb.cp/inheri= t.exp index 5f8cdd9639b..c3cfefc803c 100644 --- a/gdb/testsuite/gdb.cp/inherit.exp +++ b/gdb/testsuite/gdb.cp/inherit.exp @@ -677,7 +677,7 @@ proc test_print_mvi_classes { } { proc do_tests { } { gdb_test_no_output "set width 0" =20 - if { ![runto_main] } then { + if {![runto_main]} { perror "couldn't run to main" return } @@ -688,7 +688,7 @@ proc do_tests { } { test_ptype_vi test_ptype_mvi =20 - if { ![runto 'inheritance2'] } then { + if {![runto 'inheritance2']} { perror "couldn't run to inheritance2" return } diff --git a/gdb/testsuite/gdb.cp/koenig.exp b/gdb/testsuite/gdb.cp/koenig.= exp index 5a846c0b8c2..912a7eaadc7 100644 --- a/gdb/testsuite/gdb.cp/koenig.exp +++ b/gdb/testsuite/gdb.cp/koenig.exp @@ -22,7 +22,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile}= ${srcfile} \ =20 ############################################ =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint main" return } diff --git a/gdb/testsuite/gdb.cp/local-static.exp b/gdb/testsuite/gdb.cp/l= ocal-static.exp index 577eaa1b4d0..4cad95b4b2e 100644 --- a/gdb/testsuite/gdb.cp/local-static.exp +++ b/gdb/testsuite/gdb.cp/local-static.exp @@ -149,7 +149,7 @@ proc do_test {lang} { return -1 } =20 - if ![runto_main] then { + if {![runto_main]} { return } =20 diff --git a/gdb/testsuite/gdb.cp/local.exp b/gdb/testsuite/gdb.cp/local.exp index 140147ff723..351f39f6365 100644 --- a/gdb/testsuite/gdb.cp/local.exp +++ b/gdb/testsuite/gdb.cp/local.exp @@ -38,12 +38,12 @@ if {[prepare_for_testing "failed to prepare" $testfile = $srcfile {debug c++}]} { # # set it up at a breakpoint so we can play with the variable values # -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint" return } =20 -if ![runto 'marker1'] then { +if {![runto 'marker1']} { perror "couldn't run to marker1" return } diff --git a/gdb/testsuite/gdb.cp/m-data.exp b/gdb/testsuite/gdb.cp/m-data.= exp index f86e5fd0867..aca98c7c4c7 100644 --- a/gdb/testsuite/gdb.cp/m-data.exp +++ b/gdb/testsuite/gdb.cp/m-data.exp @@ -30,7 +30,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile {debug c++}]} { return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint" return } diff --git a/gdb/testsuite/gdb.cp/m-static.exp b/gdb/testsuite/gdb.cp/m-sta= tic.exp index 1239dbc0f1d..228c120fb7b 100644 --- a/gdb/testsuite/gdb.cp/m-static.exp +++ b/gdb/testsuite/gdb.cp/m-static.exp @@ -38,7 +38,7 @@ if {[prepare_for_testing "failed to prepare" $testfile \ return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint" return } diff --git a/gdb/testsuite/gdb.cp/mb-ctor.exp b/gdb/testsuite/gdb.cp/mb-cto= r.exp index 05dbf507e90..3bf5ee3ebad 100644 --- a/gdb/testsuite/gdb.cp/mb-ctor.exp +++ b/gdb/testsuite/gdb.cp/mb-ctor.exp @@ -31,7 +31,7 @@ if {[test_compiler_info {clang-*-*} c++]} { set using_clang false } =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint" return } diff --git a/gdb/testsuite/gdb.cp/member-name.exp b/gdb/testsuite/gdb.cp/me= mber-name.exp index 2daf872124c..7e413cac6f4 100644 --- a/gdb/testsuite/gdb.cp/member-name.exp +++ b/gdb/testsuite/gdb.cp/member-name.exp @@ -21,7 +21,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile {debug c++}]} { return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint" return } diff --git a/gdb/testsuite/gdb.cp/member-ptr.exp b/gdb/testsuite/gdb.cp/mem= ber-ptr.exp index 5b91bcb493a..8e20c018203 100644 --- a/gdb/testsuite/gdb.cp/member-ptr.exp +++ b/gdb/testsuite/gdb.cp/member-ptr.exp @@ -30,7 +30,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile {debug c++}]} { return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint" return } diff --git a/gdb/testsuite/gdb.cp/method-call-in-c.exp b/gdb/testsuite/gdb.= cp/method-call-in-c.exp index bf2032a7cc1..de54f213edb 100644 --- a/gdb/testsuite/gdb.cp/method-call-in-c.exp +++ b/gdb/testsuite/gdb.cp/method-call-in-c.exp @@ -24,7 +24,7 @@ if { [prepare_for_testing "failed to prepare" $testfile $= srcfile] } { return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { return 0 } =20 diff --git a/gdb/testsuite/gdb.cp/method.exp b/gdb/testsuite/gdb.cp/method.= exp index 9e7ee51162e..07a17b013b6 100644 --- a/gdb/testsuite/gdb.cp/method.exp +++ b/gdb/testsuite/gdb.cp/method.exp @@ -43,7 +43,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile {debug c++}]} { # # set it up at a breakpoint so we can play with the variable values # -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint" return } diff --git a/gdb/testsuite/gdb.cp/namespace-nested-import.exp b/gdb/testsui= te/gdb.cp/namespace-nested-import.exp index 134276849cf..a08a4e008df 100644 --- a/gdb/testsuite/gdb.cp/namespace-nested-import.exp +++ b/gdb/testsuite/gdb.cp/namespace-nested-import.exp @@ -25,7 +25,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile {debug c++}]} { # in a namespace inner to the one which has # been imported. =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint main" return } diff --git a/gdb/testsuite/gdb.cp/namespace.exp b/gdb/testsuite/gdb.cp/name= space.exp index 95a15aa12b7..2f3a766fd21 100644 --- a/gdb/testsuite/gdb.cp/namespace.exp +++ b/gdb/testsuite/gdb.cp/namespace.exp @@ -46,12 +46,12 @@ gdb_test "show lang" "auto; currently c\\+\\+.*" # # set it up at a breakpoint so we can play with the variable values # -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint" return } =20 -if ![runto 'marker1'] then { +if {![runto 'marker1']} { perror "couldn't run to marker1" return } @@ -192,7 +192,7 @@ gdb_test_multiple $test $test { # to print out stuff from within a function defined within a # namespace. =20 -if ![runto "C::D::marker2"] then { +if {![runto "C::D::marker2"]} { perror "couldn't run to marker2" return } diff --git a/gdb/testsuite/gdb.cp/nextoverthrow.exp b/gdb/testsuite/gdb.cp/= nextoverthrow.exp index b74ef1296ed..58e54f849e0 100644 --- a/gdb/testsuite/gdb.cp/nextoverthrow.exp +++ b/gdb/testsuite/gdb.cp/nextoverthrow.exp @@ -22,7 +22,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile {debug c++}]} { return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to main" return }=20 diff --git a/gdb/testsuite/gdb.cp/nsdecl.exp b/gdb/testsuite/gdb.cp/nsdecl.= exp index f35e38ea48e..d1859f874f1 100644 --- a/gdb/testsuite/gdb.cp/nsdecl.exp +++ b/gdb/testsuite/gdb.cp/nsdecl.exp @@ -22,7 +22,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile {debug c++}]} { return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint main" return } diff --git a/gdb/testsuite/gdb.cp/nsimport.exp b/gdb/testsuite/gdb.cp/nsimp= ort.exp index 161f5960479..56a74e73ff1 100644 --- a/gdb/testsuite/gdb.cp/nsimport.exp +++ b/gdb/testsuite/gdb.cp/nsimport.exp @@ -27,7 +27,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile {debug c++}]} { # test printing of namespace imported within # the function. =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint main" return } diff --git a/gdb/testsuite/gdb.cp/nsnested.exp b/gdb/testsuite/gdb.cp/nsnes= ted.exp index 0ac325c0f65..01aba767f7f 100644 --- a/gdb/testsuite/gdb.cp/nsnested.exp +++ b/gdb/testsuite/gdb.cp/nsnested.exp @@ -20,7 +20,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile}= ${srcfile} {debug c++} } =20 ############################################ -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint main" return } diff --git a/gdb/testsuite/gdb.cp/nsnoimports.exp b/gdb/testsuite/gdb.cp/ns= noimports.exp index ec8cedbeef4..11bcdaed834 100644 --- a/gdb/testsuite/gdb.cp/nsnoimports.exp +++ b/gdb/testsuite/gdb.cp/nsnoimports.exp @@ -20,7 +20,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile}= ${srcfile} {debug c++} } =20 ############################################ -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint main" return } diff --git a/gdb/testsuite/gdb.cp/nsrecurs.exp b/gdb/testsuite/gdb.cp/nsrec= urs.exp index c658d36fc25..30eab175df3 100644 --- a/gdb/testsuite/gdb.cp/nsrecurs.exp +++ b/gdb/testsuite/gdb.cp/nsrecurs.exp @@ -20,7 +20,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile {debug c++}]} { return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint main" return } diff --git a/gdb/testsuite/gdb.cp/nsstress.exp b/gdb/testsuite/gdb.cp/nsstr= ess.exp index c255a3557f3..2ff88791180 100644 --- a/gdb/testsuite/gdb.cp/nsstress.exp +++ b/gdb/testsuite/gdb.cp/nsstress.exp @@ -22,7 +22,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile {debug c++}]} { return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint main" continue } diff --git a/gdb/testsuite/gdb.cp/nsusing.exp b/gdb/testsuite/gdb.cp/nsusin= g.exp index 2835207a21e..f767b6b8c58 100644 --- a/gdb/testsuite/gdb.cp/nsusing.exp +++ b/gdb/testsuite/gdb.cp/nsusing.exp @@ -22,7 +22,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile {debug c++}]} { ############################################ # Test printing of namespace imported within the function. =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint main" continue } @@ -62,7 +62,7 @@ gdb_continue_to_breakpoint "marker3" # the global scope instead of the corresponding # function scope. These wrong import statements throw # this test off. This is fixed in gcc-4-4. -if [test_compiler_info gcc-4-3-*] then { setup_xfail *-*-* } +if {[test_compiler_info gcc-4-3-*]} { setup_xfail *-*-* } =20 gdb_test "print _a" "No symbol \"_a\" in current context." \ "Print _a without import at marker3" diff --git a/gdb/testsuite/gdb.cp/operator.exp b/gdb/testsuite/gdb.cp/opera= tor.exp index 7ce460f6e04..b5609ba687a 100644 --- a/gdb/testsuite/gdb.cp/operator.exp +++ b/gdb/testsuite/gdb.cp/operator.exp @@ -22,7 +22,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile}= ${srcfile} \ =20 ############################################ =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint main" return } diff --git a/gdb/testsuite/gdb.cp/oranking.exp b/gdb/testsuite/gdb.cp/orank= ing.exp index 25ba55def29..b9aa27dee57 100644 --- a/gdb/testsuite/gdb.cp/oranking.exp +++ b/gdb/testsuite/gdb.cp/oranking.exp @@ -21,7 +21,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile}= ${srcfile} {debug c++} =20 ############################################ =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint main" return } diff --git a/gdb/testsuite/gdb.cp/overload.exp b/gdb/testsuite/gdb.cp/overl= oad.exp index 73ca0d2d55c..4dcd0efc171 100644 --- a/gdb/testsuite/gdb.cp/overload.exp +++ b/gdb/testsuite/gdb.cp/overload.exp @@ -34,7 +34,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile {debug c++}]} { =20 # Set it up at a breakpoint so we can play with the variable values. =20 -if ![runto 'marker1'] then { +if {![runto 'marker1']} { perror "couldn't run to marker1" continue } @@ -359,7 +359,7 @@ with_test_prefix "list all overloads" { gdb_test "list bar" "${h1_re}${lines1}\r\n${h2_re}${lines2}" } =20 -if ![runto 'XXX::marker2'] then { +if {![runto 'XXX::marker2']} { perror "couldn't run to XXX::marker2" continue } diff --git a/gdb/testsuite/gdb.cp/pr-1023.exp b/gdb/testsuite/gdb.cp/pr-102= 3.exp index 1bb244f116b..390459a0bac 100644 --- a/gdb/testsuite/gdb.cp/pr-1023.exp +++ b/gdb/testsuite/gdb.cp/pr-1023.exp @@ -30,7 +30,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile {debug c++}]} { return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint" return } diff --git a/gdb/testsuite/gdb.cp/pr-1210.exp b/gdb/testsuite/gdb.cp/pr-121= 0.exp index a5e13e3dd0b..c74e7aa1dbc 100644 --- a/gdb/testsuite/gdb.cp/pr-1210.exp +++ b/gdb/testsuite/gdb.cp/pr-1210.exp @@ -29,7 +29,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile {debug c++}]} { return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint" return } diff --git a/gdb/testsuite/gdb.cp/pr-574.exp b/gdb/testsuite/gdb.cp/pr-574.= exp index a4d37f30fc0..32c7f634940 100644 --- a/gdb/testsuite/gdb.cp/pr-574.exp +++ b/gdb/testsuite/gdb.cp/pr-574.exp @@ -38,7 +38,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile $flags]} { return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint" return } diff --git a/gdb/testsuite/gdb.cp/pr10687.exp b/gdb/testsuite/gdb.cp/pr1068= 7.exp index 2ffd5607cac..d7db61a3ac5 100644 --- a/gdb/testsuite/gdb.cp/pr10687.exp +++ b/gdb/testsuite/gdb.cp/pr10687.exp @@ -19,7 +19,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile {debug c++}]} { return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { return } =20 diff --git a/gdb/testsuite/gdb.cp/pr10728.exp b/gdb/testsuite/gdb.cp/pr1072= 8.exp index 3b0ecac6e8d..8051eae71da 100644 --- a/gdb/testsuite/gdb.cp/pr10728.exp +++ b/gdb/testsuite/gdb.cp/pr10728.exp @@ -42,7 +42,7 @@ if { [gdb_compile "${tfx}.o ${tfy}.o" ${binfile} executa= ble {debug c++}] !=3D "" =20 clean_restart $binfile =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint" return } diff --git a/gdb/testsuite/gdb.cp/pr12028.exp b/gdb/testsuite/gdb.cp/pr1202= 8.exp index 09e9a719b1e..c9583bd1731 100644 --- a/gdb/testsuite/gdb.cp/pr12028.exp +++ b/gdb/testsuite/gdb.cp/pr12028.exp @@ -21,7 +21,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile}= ${srcfile} {debug c++} =20 ############################################ =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint main" continue } diff --git a/gdb/testsuite/gdb.cp/pr9067.exp b/gdb/testsuite/gdb.cp/pr9067.= exp index 4b601dd8f6b..417abb19f07 100644 --- a/gdb/testsuite/gdb.cp/pr9067.exp +++ b/gdb/testsuite/gdb.cp/pr9067.exp @@ -25,7 +25,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile {debug c++}]} { return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint" return } diff --git a/gdb/testsuite/gdb.cp/pr9167.exp b/gdb/testsuite/gdb.cp/pr9167.= exp index 605d1df922a..b751423afbc 100644 --- a/gdb/testsuite/gdb.cp/pr9167.exp +++ b/gdb/testsuite/gdb.cp/pr9167.exp @@ -25,7 +25,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile $flags]} { return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { return } =20 diff --git a/gdb/testsuite/gdb.cp/pr9631.exp b/gdb/testsuite/gdb.cp/pr9631.= exp index 6a010ed8179..c98e3e9bf3f 100644 --- a/gdb/testsuite/gdb.cp/pr9631.exp +++ b/gdb/testsuite/gdb.cp/pr9631.exp @@ -23,7 +23,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile {debug c++}]} { return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint" return } diff --git a/gdb/testsuite/gdb.cp/printmethod.exp b/gdb/testsuite/gdb.cp/pr= intmethod.exp index 2a8a3bc07a2..94aaba3f246 100644 --- a/gdb/testsuite/gdb.cp/printmethod.exp +++ b/gdb/testsuite/gdb.cp/printmethod.exp @@ -31,7 +31,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile {debug c++}]} { return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint" return } diff --git a/gdb/testsuite/gdb.cp/ptype-flags.exp b/gdb/testsuite/gdb.cp/pt= ype-flags.exp index 371a2a5f128..b04a4a4b8c9 100644 --- a/gdb/testsuite/gdb.cp/ptype-flags.exp +++ b/gdb/testsuite/gdb.cp/ptype-flags.exp @@ -25,7 +25,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile {debug c++}]} { return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint" return } diff --git a/gdb/testsuite/gdb.cp/ref-types.exp b/gdb/testsuite/gdb.cp/ref-= types.exp index 3ca384ae391..8135a2845f8 100644 --- a/gdb/testsuite/gdb.cp/ref-types.exp +++ b/gdb/testsuite/gdb.cp/ref-types.exp @@ -31,12 +31,12 @@ if {[prepare_for_testing "failed to prepare" $testfile = $srcfile {debug c++}]} { # # set it up at a breakpoint so we can play with the variable values # -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint" return } =20 -if ![runto 'marker1'] then { +if {![runto 'marker1']} { perror "couldn't run to marker1" return } @@ -57,12 +57,12 @@ proc gdb_start_again {} { # # set it up at a breakpoint so we can play with the variable values # - if ![runto_main] then { + if {![runto_main]} { perror "couldn't run to breakpoint" return } =20 - if ![runto 'marker1'] then { + if {![runto 'marker1']} { perror "couldn't run to marker1" return } @@ -128,7 +128,7 @@ gdb_test "print ras\[2\]" ".\[0-9\]* =3D 2" "print valu= e of ras\[2\]" gdb_test "print ras\[3\]" ".\[0-9\]* =3D 3" "print value of ras\[3\]" =20 =20 -if ![runto 'f'] then { +if {![runto 'f']} { perror "couldn't run to f" return } diff --git a/gdb/testsuite/gdb.cp/rtti.exp b/gdb/testsuite/gdb.cp/rtti.exp index e69c0cf7611..77cc6b6c35e 100644 --- a/gdb/testsuite/gdb.cp/rtti.exp +++ b/gdb/testsuite/gdb.cp/rtti.exp @@ -39,7 +39,7 @@ if {[prepare_for_testing "failed to prepare" $testfile \ return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint" return } diff --git a/gdb/testsuite/gdb.cp/rvalue-ref-types.exp b/gdb/testsuite/gdb.= cp/rvalue-ref-types.exp index a1e107838d1..6056af415cf 100644 --- a/gdb/testsuite/gdb.cp/rvalue-ref-types.exp +++ b/gdb/testsuite/gdb.cp/rvalue-ref-types.exp @@ -61,7 +61,7 @@ gdb_test "print rrat\[2\]" ".$decimal =3D 2" "print value= of rrat\[2\]" gdb_test "print rrat\[3\]" ".$decimal =3D 3" "print value of rrat\[3\]" =20 =20 -if {![runto 'f']} then { +if {![runto 'f']} { perror "couldn't run to f" return } diff --git a/gdb/testsuite/gdb.cp/shadow.exp b/gdb/testsuite/gdb.cp/shadow.= exp index f0bfb5b476d..641feed752c 100644 --- a/gdb/testsuite/gdb.cp/shadow.exp +++ b/gdb/testsuite/gdb.cp/shadow.exp @@ -23,7 +23,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile {debug c++}]} { return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint main" return } diff --git a/gdb/testsuite/gdb.cp/smartp.exp b/gdb/testsuite/gdb.cp/smartp.= exp index a40d54fa135..c94dfae4394 100644 --- a/gdb/testsuite/gdb.cp/smartp.exp +++ b/gdb/testsuite/gdb.cp/smartp.exp @@ -21,7 +21,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile}= ${srcfile} {debug c++} =20 ############################################ =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint main" return } diff --git a/gdb/testsuite/gdb.cp/try_catch.exp b/gdb/testsuite/gdb.cp/try_= catch.exp index 31fe298b10f..437309ada51 100644 --- a/gdb/testsuite/gdb.cp/try_catch.exp +++ b/gdb/testsuite/gdb.cp/try_catch.exp @@ -30,7 +30,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile {debug c++}]} { return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint" return } diff --git a/gdb/testsuite/gdb.cp/userdef.exp b/gdb/testsuite/gdb.cp/userde= f.exp index d67e42803fb..5eba7e2cd81 100644 --- a/gdb/testsuite/gdb.cp/userdef.exp +++ b/gdb/testsuite/gdb.cp/userdef.exp @@ -27,7 +27,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile {debug c++}]} { return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint" return } diff --git a/gdb/testsuite/gdb.cp/virtbase.exp b/gdb/testsuite/gdb.cp/virtb= ase.exp index 828f8f576da..b026cfb4fba 100644 --- a/gdb/testsuite/gdb.cp/virtbase.exp +++ b/gdb/testsuite/gdb.cp/virtbase.exp @@ -23,7 +23,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile {debug c++}]} { return -1 } =20 -if {![runto_main]} then { +if {![runto_main]} { perror "couldn't run to breakpoint" return } diff --git a/gdb/testsuite/gdb.cp/virtbase2.exp b/gdb/testsuite/gdb.cp/virt= base2.exp index dc9149bf4a1..d58403b7fa0 100644 --- a/gdb/testsuite/gdb.cp/virtbase2.exp +++ b/gdb/testsuite/gdb.cp/virtbase2.exp @@ -23,7 +23,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile {debug c++}]} { return -1 } =20 -if {![runto_main]} then { +if {![runto_main]} { perror "couldn't run to main" return } diff --git a/gdb/testsuite/gdb.cp/virtfunc.exp b/gdb/testsuite/gdb.cp/virtf= unc.exp index 0d354370a53..23088f75850 100644 --- a/gdb/testsuite/gdb.cp/virtfunc.exp +++ b/gdb/testsuite/gdb.cp/virtfunc.exp @@ -273,7 +273,7 @@ proc do_tests {} { gdb_test_no_output "set language c++" "" gdb_test_no_output "set width 0" "" =20 - if ![runto_main] then { + if {![runto_main]} { perror "couldn't run to breakpoint" return } diff --git a/gdb/testsuite/gdb.cp/virtfunc2.exp b/gdb/testsuite/gdb.cp/virt= func2.exp index 0a06d753474..3ec05301036 100644 --- a/gdb/testsuite/gdb.cp/virtfunc2.exp +++ b/gdb/testsuite/gdb.cp/virtfunc2.exp @@ -28,7 +28,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile {debug c++}]} { return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to breakpoint" return } diff --git a/gdb/testsuite/gdb.cp/watch-cp.exp b/gdb/testsuite/gdb.cp/watch= -cp.exp index 30e804d3858..8ef64bb59b7 100644 --- a/gdb/testsuite/gdb.cp/watch-cp.exp +++ b/gdb/testsuite/gdb.cp/watch-cp.exp @@ -21,7 +21,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile {debug c++}]} { return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { perror "couldn't run to main" return } diff --git a/gdb/testsuite/gdb.cp/wide_char_types.exp b/gdb/testsuite/gdb.c= p/wide_char_types.exp index 9a086c88e0b..c37c7c189ec 100644 --- a/gdb/testsuite/gdb.cp/wide_char_types.exp +++ b/gdb/testsuite/gdb.cp/wide_char_types.exp @@ -47,7 +47,7 @@ proc wide_char_types_program {lang} { return -1 } =20 - if ![runto_main] then { + if {![runto_main]} { return 0 } do_test_wide_char $lang "u16" "u32" "wchar"