aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2022-11-14 14:06:11 +0000
committerAndrew Burgess <aburgess@redhat.com>2022-11-28 21:04:09 +0000
commit95701caeadd48415b3cb3d7fc7d9a4ef84211c55 (patch)
tree962f42653c9fe9714acf4cdea617094fe011f8c6 /gdb
parent75b6f3866450afa1219ca986910619302f7effb7 (diff)
downloadgdb-95701caeadd48415b3cb3d7fc7d9a4ef84211c55.zip
gdb-95701caeadd48415b3cb3d7fc7d9a4ef84211c55.tar.gz
gdb-95701caeadd48415b3cb3d7fc7d9a4ef84211c55.tar.bz2
gdb/testsuite: remove use of then keyword from gdb.cp/*.exp
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. This commit removes all use of the 'then' keyword from the gdb.cp/ test script directory. There should be no changes in what is tested after this commit.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/gdb.cp/ambiguous.exp2
-rw-r--r--gdb/testsuite/gdb.cp/anon-union.exp2
-rw-r--r--gdb/testsuite/gdb.cp/breakpoint.exp2
-rw-r--r--gdb/testsuite/gdb.cp/bs15503.exp2
-rw-r--r--gdb/testsuite/gdb.cp/casts.exp4
-rw-r--r--gdb/testsuite/gdb.cp/class2.exp2
-rw-r--r--gdb/testsuite/gdb.cp/classes.exp2
-rw-r--r--gdb/testsuite/gdb.cp/converts.exp2
-rw-r--r--gdb/testsuite/gdb.cp/ctti.exp4
-rw-r--r--gdb/testsuite/gdb.cp/derivation.exp2
-rw-r--r--gdb/testsuite/gdb.cp/disasm-func-name.exp2
-rw-r--r--gdb/testsuite/gdb.cp/dispcxx.exp2
-rw-r--r--gdb/testsuite/gdb.cp/ena-dis-br-range.exp2
-rw-r--r--gdb/testsuite/gdb.cp/filename.exp2
-rw-r--r--gdb/testsuite/gdb.cp/fpointer.exp2
-rw-r--r--gdb/testsuite/gdb.cp/gdb1355.exp2
-rw-r--r--gdb/testsuite/gdb.cp/gdb2384.exp2
-rw-r--r--gdb/testsuite/gdb.cp/gdb2495.exp4
-rw-r--r--gdb/testsuite/gdb.cp/inherit.exp4
-rw-r--r--gdb/testsuite/gdb.cp/koenig.exp2
-rw-r--r--gdb/testsuite/gdb.cp/local-static.exp2
-rw-r--r--gdb/testsuite/gdb.cp/local.exp4
-rw-r--r--gdb/testsuite/gdb.cp/m-data.exp2
-rw-r--r--gdb/testsuite/gdb.cp/m-static.exp2
-rw-r--r--gdb/testsuite/gdb.cp/mb-ctor.exp2
-rw-r--r--gdb/testsuite/gdb.cp/member-name.exp2
-rw-r--r--gdb/testsuite/gdb.cp/member-ptr.exp2
-rw-r--r--gdb/testsuite/gdb.cp/method-call-in-c.exp2
-rw-r--r--gdb/testsuite/gdb.cp/method.exp2
-rw-r--r--gdb/testsuite/gdb.cp/namespace-nested-import.exp2
-rw-r--r--gdb/testsuite/gdb.cp/namespace.exp6
-rw-r--r--gdb/testsuite/gdb.cp/nextoverthrow.exp2
-rw-r--r--gdb/testsuite/gdb.cp/nsdecl.exp2
-rw-r--r--gdb/testsuite/gdb.cp/nsimport.exp2
-rw-r--r--gdb/testsuite/gdb.cp/nsnested.exp2
-rw-r--r--gdb/testsuite/gdb.cp/nsnoimports.exp2
-rw-r--r--gdb/testsuite/gdb.cp/nsrecurs.exp2
-rw-r--r--gdb/testsuite/gdb.cp/nsstress.exp2
-rw-r--r--gdb/testsuite/gdb.cp/nsusing.exp4
-rw-r--r--gdb/testsuite/gdb.cp/operator.exp2
-rw-r--r--gdb/testsuite/gdb.cp/oranking.exp2
-rw-r--r--gdb/testsuite/gdb.cp/overload.exp4
-rw-r--r--gdb/testsuite/gdb.cp/pr-1023.exp2
-rw-r--r--gdb/testsuite/gdb.cp/pr-1210.exp2
-rw-r--r--gdb/testsuite/gdb.cp/pr-574.exp2
-rw-r--r--gdb/testsuite/gdb.cp/pr10687.exp2
-rw-r--r--gdb/testsuite/gdb.cp/pr10728.exp2
-rw-r--r--gdb/testsuite/gdb.cp/pr12028.exp2
-rw-r--r--gdb/testsuite/gdb.cp/pr9067.exp2
-rw-r--r--gdb/testsuite/gdb.cp/pr9167.exp2
-rw-r--r--gdb/testsuite/gdb.cp/pr9631.exp2
-rw-r--r--gdb/testsuite/gdb.cp/printmethod.exp2
-rw-r--r--gdb/testsuite/gdb.cp/ptype-flags.exp2
-rw-r--r--gdb/testsuite/gdb.cp/ref-types.exp10
-rw-r--r--gdb/testsuite/gdb.cp/rtti.exp2
-rw-r--r--gdb/testsuite/gdb.cp/rvalue-ref-types.exp2
-rw-r--r--gdb/testsuite/gdb.cp/shadow.exp2
-rw-r--r--gdb/testsuite/gdb.cp/smartp.exp2
-rw-r--r--gdb/testsuite/gdb.cp/try_catch.exp2
-rw-r--r--gdb/testsuite/gdb.cp/userdef.exp2
-rw-r--r--gdb/testsuite/gdb.cp/virtbase.exp2
-rw-r--r--gdb/testsuite/gdb.cp/virtbase2.exp2
-rw-r--r--gdb/testsuite/gdb.cp/virtfunc.exp2
-rw-r--r--gdb/testsuite/gdb.cp/virtfunc2.exp2
-rw-r--r--gdb/testsuite/gdb.cp/watch-cp.exp2
-rw-r--r--gdb/testsuite/gdb.cp/wide_char_types.exp2
66 files changed, 79 insertions, 79 deletions
diff --git a/gdb/testsuite/gdb.cp/ambiguous.exp b/gdb/testsuite/gdb.cp/ambiguous.exp
index c6bc9a6..0f04668 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 $srcfile \
return -1
}
-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/anon-union.exp
index e086bfb..9f18545 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 $srcfile {debug c++}]} {
return -1
}
-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/breakpoint.exp
index 1a0f946..e1f2d4c 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 $srcfile {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/bs15503.exp
index bf5e660..f00421a 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 $srcfile {debug c++}]} {
return -1
}
-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 0f6460b..43851d4 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 $srcfile {debug c++}]} {
return -1
}
-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
}
-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 cc192b6..9392e25 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 $srcfile $flags]} {
gdb_test_no_output "set print object off"
gdb_test_no_output "set print symbol off"
-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/classes.exp
index 9a94775..beac268 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" ""
- 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/converts.exp
index e4357fc..ea7a2f4 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++}
############################################
-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 36b7d34..4a2012e 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
}
-if ![runto_main] then {
+if {![runto_main]} {
perror "couldn't run to breakpoint"
return
}
@@ -45,7 +45,7 @@ gdb_test "print i" "\\$\[0-9\]+ = 4"
# TODO: this needs more work before actually deploying it.
# So bail out here.
-if { [ test_compiler_info gcc-*] } then { return }
+if {[test_compiler_info gcc-*]} { return }
gdb_test_multiple "print add<int>(2,2)" "print add<int>(2,2)" {
-re "\\$\[0-9\]+ = 4\r\n$gdb_prompt $" {
diff --git a/gdb/testsuite/gdb.cp/derivation.exp b/gdb/testsuite/gdb.cp/derivation.exp
index f49ab20..f5d20a0 100644
--- a/gdb/testsuite/gdb.cp/derivation.exp
+++ b/gdb/testsuite/gdb.cp/derivation.exp
@@ -55,7 +55,7 @@ with_test_prefix "before run" {
# Set it up at a breakpoint so we can play with the variable values.
-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 7d325fe..45f18ab 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
}
-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/dispcxx.exp
index f82e588..9d2e340 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 $srcfile {debug c++}]} {
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
perror "couldn't run to main"
return
}
diff --git a/gdb/testsuite/gdb.cp/ena-dis-br-range.exp b/gdb/testsuite/gdb.cp/ena-dis-br-range.exp
index 83c9838..967d6b4 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 $srcfile {debug c++}]} {
return -1
}
-if ![runto 'marker'] then {
+if {![runto 'marker']} {
return -1
}
diff --git a/gdb/testsuite/gdb.cp/filename.exp b/gdb/testsuite/gdb.cp/filename.exp
index 113c84d..6d97ee5 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 $srcfile {debug c++}]} {
return -1
}
-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/fpointer.exp
index f2af2b9..5fc9905 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
}
-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/gdb1355.exp
index ecbf88f..e18bcc1 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 $srcfile {debug c++}]} {
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
perror "couldn't run to main"
return
}
diff --git a/gdb/testsuite/gdb.cp/gdb2384.exp b/gdb/testsuite/gdb.cp/gdb2384.exp
index 4181ab4..7fc5a5b 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}
-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/gdb2495.exp
index 1babf5e..6ade5d9 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 $srcfile {debug c++}]} {
return -1
}
-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.."
# 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/inherit.exp
index 5f8cdd9..c3cfefc 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"
- 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
- 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 5a846c0..912a7ea 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} \
############################################
-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/local-static.exp
index 577eaa1..4cad95b 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
}
- if ![runto_main] then {
+ if {![runto_main]} {
return
}
diff --git a/gdb/testsuite/gdb.cp/local.exp b/gdb/testsuite/gdb.cp/local.exp
index 140147f..351f39f 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
}
-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 f86e5fd..aca98c7 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 $srcfile {debug c++}]} {
return -1
}
-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-static.exp
index 1239dbc..228c120 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
}
-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-ctor.exp
index 05dbf50..3bf5ee3 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
}
-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/member-name.exp
index 2daf872..7e413ca 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 $srcfile {debug c++}]} {
return -1
}
-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/member-ptr.exp
index 5b91bcb..8e20c01 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 $srcfile {debug c++}]} {
return -1
}
-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 bf2032a..de54f21 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
}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.cp/method.exp b/gdb/testsuite/gdb.cp/method.exp
index 9e7ee51..07a17b0 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 $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
}
diff --git a/gdb/testsuite/gdb.cp/namespace-nested-import.exp b/gdb/testsuite/gdb.cp/namespace-nested-import.exp
index 1342768..a08a4e0 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 $srcfile {debug c++}]} {
# in a namespace inner to the one which has
# been imported.
-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/namespace.exp
index 95a15aa..2f3a766 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
}
-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.
-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 b74ef12..58e54f8 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 $srcfile {debug c++}]} {
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
perror "couldn't run to main"
return
}
diff --git a/gdb/testsuite/gdb.cp/nsdecl.exp b/gdb/testsuite/gdb.cp/nsdecl.exp
index f35e38e..d1859f8 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 $srcfile {debug c++}]} {
return -1
}
-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/nsimport.exp
index 161f596..56a74e7 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 $srcfile {debug c++}]} {
# test printing of namespace imported within
# the function.
-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/nsnested.exp
index 0ac325c..01aba76 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++}
}
############################################
-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/nsnoimports.exp
index ec8cedb..11bcdae 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++}
}
############################################
-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/nsrecurs.exp
index c658d36..30eab17 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 $srcfile {debug c++}]} {
return -1
}
-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/nsstress.exp
index c255a35..2ff8879 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 $srcfile {debug c++}]} {
return -1
}
-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/nsusing.exp
index 2835207..f767b6b 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 $srcfile {debug c++}]} {
############################################
# Test printing of namespace imported within the function.
-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 *-*-* }
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/operator.exp
index 7ce460f..b5609ba 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} \
############################################
-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/oranking.exp
index 25ba55d..b9aa27d 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++}
############################################
-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/overload.exp
index 73ca0d2..4dcd0ef 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 $srcfile {debug c++}]} {
# Set it up at a breakpoint so we can play with the variable values.
-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}"
}
-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-1023.exp
index 1bb244f..390459a 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 $srcfile {debug c++}]} {
return -1
}
-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-1210.exp
index a5e13e3..c74e7aa 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 $srcfile {debug c++}]} {
return -1
}
-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 a4d37f3..32c7f63 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 $srcfile $flags]} {
return -1
}
-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/pr10687.exp
index 2ffd560..d7db61a 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 $srcfile {debug c++}]} {
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return
}
diff --git a/gdb/testsuite/gdb.cp/pr10728.exp b/gdb/testsuite/gdb.cp/pr10728.exp
index 3b0ecac..8051eae 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} executable {debug c++}] != ""
clean_restart $binfile
-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/pr12028.exp
index 09e9a71..c9583bd 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++}
############################################
-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 4b601dd..417abb1 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 $srcfile {debug c++}]} {
return -1
}
-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 605d1df..b751423 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 $srcfile $flags]} {
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return
}
diff --git a/gdb/testsuite/gdb.cp/pr9631.exp b/gdb/testsuite/gdb.cp/pr9631.exp
index 6a010ed..c98e3e9 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 $srcfile {debug c++}]} {
return -1
}
-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/printmethod.exp
index 2a8a3bc..94aaba3 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 $srcfile {debug c++}]} {
return -1
}
-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/ptype-flags.exp
index 371a2a5..b04a4a4 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 $srcfile {debug c++}]} {
return -1
}
-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 3ca384a..8135a28 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
}
-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
}
- 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\]* = 2" "print value of ras\[2\]"
gdb_test "print ras\[3\]" ".\[0-9\]* = 3" "print value of ras\[3\]"
-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 e69c0cf..77cc6b6 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
}
-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 a1e1078..6056af4 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 = 2" "print value of rrat\[2\]"
gdb_test "print rrat\[3\]" ".$decimal = 3" "print value of rrat\[3\]"
-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 f0bfb5b..641feed 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 $srcfile {debug c++}]} {
return -1
}
-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 a40d54f..c94dfae 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++}
############################################
-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 31fe298..437309a 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 $srcfile {debug c++}]} {
return -1
}
-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/userdef.exp
index d67e428..5eba7e2 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 $srcfile {debug c++}]} {
return -1
}
-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/virtbase.exp
index 828f8f5..b026cfb 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 $srcfile {debug c++}]} {
return -1
}
-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/virtbase2.exp
index dc9149b..d58403b 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 $srcfile {debug c++}]} {
return -1
}
-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/virtfunc.exp
index 0d35437..23088f7 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" ""
- 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/virtfunc2.exp
index 0a06d75..3ec0530 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 $srcfile {debug c++}]} {
return -1
}
-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 30e804d..8ef64bb 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 $srcfile {debug c++}]} {
return -1
}
-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.cp/wide_char_types.exp
index 9a086c8..c37c7c1 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
}
- if ![runto_main] then {
+ if {![runto_main]} {
return 0
}
do_test_wide_char $lang "u16" "u32" "wchar"