aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2022-11-14 11:31:04 +0000
committerAndrew Burgess <aburgess@redhat.com>2022-11-28 21:04:09 +0000
commit65a33d75c2667895f067cc5f9079215126cbb2eb (patch)
treefdd3f74defa60f3a0cb96123071d49990fd9cfe0
parented7fbdd033a272ff0d7d82c2153d7d0fade80d26 (diff)
downloadgdb-65a33d75c2667895f067cc5f9079215126cbb2eb.zip
gdb-65a33d75c2667895f067cc5f9079215126cbb2eb.tar.gz
gdb-65a33d75c2667895f067cc5f9079215126cbb2eb.tar.bz2
gdb/testsuite: remove use of then keyword from gdb.base/*.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.base/ test script directory. There should be no changes in what is tested after this commit.
-rw-r--r--gdb/testsuite/gdb.base/a2-run.exp4
-rw-r--r--gdb/testsuite/gdb.base/advance.exp2
-rw-r--r--gdb/testsuite/gdb.base/alias.exp2
-rw-r--r--gdb/testsuite/gdb.base/all-bin.exp2
-rw-r--r--gdb/testsuite/gdb.base/annota-input-while-running.exp2
-rw-r--r--gdb/testsuite/gdb.base/annota1.exp2
-rw-r--r--gdb/testsuite/gdb.base/anon.exp2
-rw-r--r--gdb/testsuite/gdb.base/arithmet.exp2
-rw-r--r--gdb/testsuite/gdb.base/arrayidx.exp2
-rw-r--r--gdb/testsuite/gdb.base/assign.exp2
-rw-r--r--gdb/testsuite/gdb.base/async.exp2
-rw-r--r--gdb/testsuite/gdb.base/attach-wait-input.exp2
-rw-r--r--gdb/testsuite/gdb.base/attach.exp2
-rw-r--r--gdb/testsuite/gdb.base/auto-connect-native-target.exp2
-rw-r--r--gdb/testsuite/gdb.base/auxv.exp2
-rw-r--r--gdb/testsuite/gdb.base/backtrace.exp2
-rw-r--r--gdb/testsuite/gdb.base/bfp-test.exp2
-rw-r--r--gdb/testsuite/gdb.base/bigcore.exp4
-rw-r--r--gdb/testsuite/gdb.base/bitfields2.exp8
-rw-r--r--gdb/testsuite/gdb.base/bp-permanent.exp2
-rw-r--r--gdb/testsuite/gdb.base/break-idempotent.exp2
-rw-r--r--gdb/testsuite/gdb.base/break-unload-file.exp2
-rw-r--r--gdb/testsuite/gdb.base/break.exp18
-rw-r--r--gdb/testsuite/gdb.base/bt-on-error-and-warning.exp2
-rw-r--r--gdb/testsuite/gdb.base/bt-on-fatal-signal.exp2
-rw-r--r--gdb/testsuite/gdb.base/bt-selected-frame.exp2
-rw-r--r--gdb/testsuite/gdb.base/call-ar-st.exp4
-rw-r--r--gdb/testsuite/gdb.base/call-rt-st.exp2
-rw-r--r--gdb/testsuite/gdb.base/call-sc.exp2
-rw-r--r--gdb/testsuite/gdb.base/call-strs.exp2
-rw-r--r--gdb/testsuite/gdb.base/callfuncs.exp10
-rw-r--r--gdb/testsuite/gdb.base/catch-fork-static.exp2
-rw-r--r--gdb/testsuite/gdb.base/catch-signal-siginfo-cond.exp2
-rw-r--r--gdb/testsuite/gdb.base/catch-syscall.exp28
-rw-r--r--gdb/testsuite/gdb.base/checkpoint.exp2
-rw-r--r--gdb/testsuite/gdb.base/clear_non_user_bp.exp2
-rw-r--r--gdb/testsuite/gdb.base/compare-sections.exp2
-rw-r--r--gdb/testsuite/gdb.base/completion.exp2
-rw-r--r--gdb/testsuite/gdb.base/complex-parts.exp2
-rw-r--r--gdb/testsuite/gdb.base/complex.exp6
-rw-r--r--gdb/testsuite/gdb.base/cond-eval-mode.exp2
-rw-r--r--gdb/testsuite/gdb.base/cond-expr.exp2
-rw-r--r--gdb/testsuite/gdb.base/condbreak-call-false.exp2
-rw-r--r--gdb/testsuite/gdb.base/consecutive-step-over.exp2
-rw-r--r--gdb/testsuite/gdb.base/consecutive.exp8
-rw-r--r--gdb/testsuite/gdb.base/constvars.exp4
-rw-r--r--gdb/testsuite/gdb.base/coredump-filter.exp2
-rw-r--r--gdb/testsuite/gdb.base/corefile.exp6
-rw-r--r--gdb/testsuite/gdb.base/corefile2.exp4
-rw-r--r--gdb/testsuite/gdb.base/ctf-constvars.exp2
-rw-r--r--gdb/testsuite/gdb.base/ctf-ptype.exp10
-rw-r--r--gdb/testsuite/gdb.base/decl-before-def.exp2
-rw-r--r--gdb/testsuite/gdb.base/default.exp10
-rw-r--r--gdb/testsuite/gdb.base/define.exp2
-rw-r--r--gdb/testsuite/gdb.base/dfp-test.exp2
-rw-r--r--gdb/testsuite/gdb.base/disabled-location.exp2
-rw-r--r--gdb/testsuite/gdb.base/display.exp2
-rw-r--r--gdb/testsuite/gdb.base/dprintf-detach.exp2
-rw-r--r--gdb/testsuite/gdb.base/dump.exp20
-rw-r--r--gdb/testsuite/gdb.base/duplicate-bp.exp2
-rw-r--r--gdb/testsuite/gdb.base/eh_return.exp2
-rw-r--r--gdb/testsuite/gdb.base/ena-dis-br.exp16
-rw-r--r--gdb/testsuite/gdb.base/endianity.exp2
-rw-r--r--gdb/testsuite/gdb.base/enum_cond.exp2
-rw-r--r--gdb/testsuite/gdb.base/eval-skip.exp2
-rw-r--r--gdb/testsuite/gdb.base/exe-lock.exp2
-rw-r--r--gdb/testsuite/gdb.base/exec-invalid-sysroot.exp2
-rw-r--r--gdb/testsuite/gdb.base/execl-update-breakpoints.exp6
-rw-r--r--gdb/testsuite/gdb.base/exprs.exp2
-rw-r--r--gdb/testsuite/gdb.base/fileio.exp2
-rw-r--r--gdb/testsuite/gdb.base/finish.exp4
-rw-r--r--gdb/testsuite/gdb.base/fixsection.exp2
-rw-r--r--gdb/testsuite/gdb.base/float.exp30
-rw-r--r--gdb/testsuite/gdb.base/float128.exp2
-rw-r--r--gdb/testsuite/gdb.base/floatn.exp2
-rw-r--r--gdb/testsuite/gdb.base/foll-exec-mode.exp6
-rw-r--r--gdb/testsuite/gdb.base/foll-exec.exp14
-rw-r--r--gdb/testsuite/gdb.base/foll-vfork.exp2
-rw-r--r--gdb/testsuite/gdb.base/fork-running-state.exp2
-rw-r--r--gdb/testsuite/gdb.base/frame-args.exp2
-rw-r--r--gdb/testsuite/gdb.base/frame-info-consistent.exp2
-rw-r--r--gdb/testsuite/gdb.base/frameapply.exp2
-rw-r--r--gdb/testsuite/gdb.base/funcargs.exp28
-rw-r--r--gdb/testsuite/gdb.base/gcore-buffer-overflow.exp2
-rw-r--r--gdb/testsuite/gdb.base/gcore.exp8
-rw-r--r--gdb/testsuite/gdb.base/gdb1090.exp2
-rw-r--r--gdb/testsuite/gdb.base/gdb11530.exp2
-rw-r--r--gdb/testsuite/gdb.base/gdb11531.exp2
-rw-r--r--gdb/testsuite/gdb.base/gdb1250.exp2
-rw-r--r--gdb/testsuite/gdb.base/gdb1555.exp2
-rw-r--r--gdb/testsuite/gdb.base/gdb1821.exp2
-rw-r--r--gdb/testsuite/gdb.base/gnu-ifunc.exp4
-rw-r--r--gdb/testsuite/gdb.base/gnu_vector.exp2
-rw-r--r--gdb/testsuite/gdb.base/gold-gdb-index.exp2
-rw-r--r--gdb/testsuite/gdb.base/hbreak-in-shr-unsupported.exp2
-rw-r--r--gdb/testsuite/gdb.base/hbreak2.exp8
-rw-r--r--gdb/testsuite/gdb.base/hook-stop.exp2
-rw-r--r--gdb/testsuite/gdb.base/huge.exp2
-rw-r--r--gdb/testsuite/gdb.base/infcall-input.exp2
-rw-r--r--gdb/testsuite/gdb.base/inferior-args.exp2
-rw-r--r--gdb/testsuite/gdb.base/inferior-died.exp2
-rw-r--r--gdb/testsuite/gdb.base/info-fun.exp2
-rw-r--r--gdb/testsuite/gdb.base/info-locals-unused-static-var.exp2
-rw-r--r--gdb/testsuite/gdb.base/info-os.exp6
-rw-r--r--gdb/testsuite/gdb.base/info-proc.exp2
-rw-r--r--gdb/testsuite/gdb.base/info-program.exp2
-rw-r--r--gdb/testsuite/gdb.base/info_qt.exp2
-rw-r--r--gdb/testsuite/gdb.base/inline-frame-cycle-unwind.exp2
-rw-r--r--gdb/testsuite/gdb.base/interp.exp2
-rw-r--r--gdb/testsuite/gdb.base/interrupt.exp4
-rw-r--r--gdb/testsuite/gdb.base/jit-reader-exec.exp2
-rw-r--r--gdb/testsuite/gdb.base/jump.exp2
-rw-r--r--gdb/testsuite/gdb.base/label-without-address.exp2
-rw-r--r--gdb/testsuite/gdb.base/langs.exp12
-rw-r--r--gdb/testsuite/gdb.base/large-frame.exp2
-rw-r--r--gdb/testsuite/gdb.base/list-missing-source.exp2
-rw-r--r--gdb/testsuite/gdb.base/list.exp8
-rw-r--r--gdb/testsuite/gdb.base/logical.exp2
-rw-r--r--gdb/testsuite/gdb.base/long-inferior-output.exp2
-rw-r--r--gdb/testsuite/gdb.base/long_long.exp2
-rw-r--r--gdb/testsuite/gdb.base/longjmp.exp2
-rw-r--r--gdb/testsuite/gdb.base/maint-info-sections.exp2
-rw-r--r--gdb/testsuite/gdb.base/maint-print-frame-id.exp2
-rw-r--r--gdb/testsuite/gdb.base/maint.exp2
-rw-r--r--gdb/testsuite/gdb.base/max-value-size.exp6
-rw-r--r--gdb/testsuite/gdb.base/memattr.exp16
-rw-r--r--gdb/testsuite/gdb.base/mips_pro.exp6
-rw-r--r--gdb/testsuite/gdb.base/miscexprs.exp2
-rw-r--r--gdb/testsuite/gdb.base/multi-forks.exp2
-rw-r--r--gdb/testsuite/gdb.base/nodebug.exp4
-rw-r--r--gdb/testsuite/gdb.base/non-lazy-array-index.exp2
-rw-r--r--gdb/testsuite/gdb.base/noreturn-finish.exp2
-rw-r--r--gdb/testsuite/gdb.base/noreturn-return.exp2
-rw-r--r--gdb/testsuite/gdb.base/opaque.exp10
-rw-r--r--gdb/testsuite/gdb.base/overlays.exp14
-rw-r--r--gdb/testsuite/gdb.base/paginate-after-ctrl-c-running.exp2
-rw-r--r--gdb/testsuite/gdb.base/paginate-bg-execution.exp2
-rw-r--r--gdb/testsuite/gdb.base/paginate-inferior-exit.exp2
-rw-r--r--gdb/testsuite/gdb.base/pc-fp.exp2
-rw-r--r--gdb/testsuite/gdb.base/permissions.exp2
-rw-r--r--gdb/testsuite/gdb.base/pie-execl.exp4
-rw-r--r--gdb/testsuite/gdb.base/pointers.exp2
-rw-r--r--gdb/testsuite/gdb.base/pr11022.exp2
-rw-r--r--gdb/testsuite/gdb.base/premature-dummy-frame-removal.exp2
-rw-r--r--gdb/testsuite/gdb.base/printcmds.exp2
-rw-r--r--gdb/testsuite/gdb.base/prologue.exp2
-rw-r--r--gdb/testsuite/gdb.base/ptype.exp12
-rw-r--r--gdb/testsuite/gdb.base/quit-live.exp2
-rw-r--r--gdb/testsuite/gdb.base/radix.exp4
-rw-r--r--gdb/testsuite/gdb.base/readnever.exp2
-rw-r--r--gdb/testsuite/gdb.base/recurse.exp2
-rw-r--r--gdb/testsuite/gdb.base/reggroups.exp2
-rw-r--r--gdb/testsuite/gdb.base/relational.exp2
-rw-r--r--gdb/testsuite/gdb.base/remote.exp10
-rw-r--r--gdb/testsuite/gdb.base/return.exp2
-rw-r--r--gdb/testsuite/gdb.base/return2.exp6
-rw-r--r--gdb/testsuite/gdb.base/savedregs.exp2
-rw-r--r--gdb/testsuite/gdb.base/scope.exp60
-rw-r--r--gdb/testsuite/gdb.base/sect-cmd.exp2
-rw-r--r--gdb/testsuite/gdb.base/sepdebug.exp16
-rw-r--r--gdb/testsuite/gdb.base/set-noassign.exp2
-rw-r--r--gdb/testsuite/gdb.base/setshow.exp4
-rw-r--r--gdb/testsuite/gdb.base/setvar.exp4
-rw-r--r--gdb/testsuite/gdb.base/shlib-call.exp2
-rw-r--r--gdb/testsuite/gdb.base/shreloc.exp2
-rw-r--r--gdb/testsuite/gdb.base/sigall.exp8
-rw-r--r--gdb/testsuite/gdb.base/sigaltstack.exp2
-rw-r--r--gdb/testsuite/gdb.base/sigbpt.exp2
-rw-r--r--gdb/testsuite/gdb.base/siginfo-addr.exp2
-rw-r--r--gdb/testsuite/gdb.base/siginfo-obj.exp4
-rw-r--r--gdb/testsuite/gdb.base/siginfo-thread.exp2
-rw-r--r--gdb/testsuite/gdb.base/siginfo.exp2
-rw-r--r--gdb/testsuite/gdb.base/signals-state-child.exp2
-rw-r--r--gdb/testsuite/gdb.base/signals.exp2
-rw-r--r--gdb/testsuite/gdb.base/signest.exp2
-rw-r--r--gdb/testsuite/gdb.base/signull.exp2
-rw-r--r--gdb/testsuite/gdb.base/sigrepeat.exp2
-rw-r--r--gdb/testsuite/gdb.base/sizeof.exp2
-rw-r--r--gdb/testsuite/gdb.base/so-impl-ld.exp2
-rw-r--r--gdb/testsuite/gdb.base/solib-disc.exp2
-rw-r--r--gdb/testsuite/gdb.base/solib-display.exp2
-rw-r--r--gdb/testsuite/gdb.base/solib-symbol.exp2
-rw-r--r--gdb/testsuite/gdb.base/source-dir.exp2
-rw-r--r--gdb/testsuite/gdb.base/source-execution.exp2
-rw-r--r--gdb/testsuite/gdb.base/sss-bp-on-user-bp.exp2
-rw-r--r--gdb/testsuite/gdb.base/stack-checking.exp2
-rw-r--r--gdb/testsuite/gdb.base/stack-protector.exp2
-rw-r--r--gdb/testsuite/gdb.base/step-break.exp2
-rw-r--r--gdb/testsuite/gdb.base/step-line.exp2
-rw-r--r--gdb/testsuite/gdb.base/step-over-syscall.exp4
-rw-r--r--gdb/testsuite/gdb.base/step-test.exp4
-rw-r--r--gdb/testsuite/gdb.base/store.exp2
-rw-r--r--gdb/testsuite/gdb.base/structs.exp2
-rw-r--r--gdb/testsuite/gdb.base/structs2.exp2
-rw-r--r--gdb/testsuite/gdb.base/sym-file.exp12
-rw-r--r--gdb/testsuite/gdb.base/symbol-alias.exp2
-rw-r--r--gdb/testsuite/gdb.base/term.exp2
-rw-r--r--gdb/testsuite/gdb.base/twice.exp2
-rw-r--r--gdb/testsuite/gdb.base/type-opaque.exp2
-rw-r--r--gdb/testsuite/gdb.base/until.exp2
-rw-r--r--gdb/testsuite/gdb.base/unwind-on-each-insn.exp2
-rw-r--r--gdb/testsuite/gdb.base/varargs.exp2
-rw-r--r--gdb/testsuite/gdb.base/volatile.exp4
-rw-r--r--gdb/testsuite/gdb.base/watch-cond-infcall.exp2
-rw-r--r--gdb/testsuite/gdb.base/watch-cond.exp6
-rw-r--r--gdb/testsuite/gdb.base/watch-non-mem.exp2
-rw-r--r--gdb/testsuite/gdb.base/watch-read.exp2
-rw-r--r--gdb/testsuite/gdb.base/watch-vfork.exp2
-rw-r--r--gdb/testsuite/gdb.base/watch_thread_num.exp2
-rw-r--r--gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp2
-rw-r--r--gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp4
-rw-r--r--gdb/testsuite/gdb.base/watchpoint.exp18
-rw-r--r--gdb/testsuite/gdb.base/wchar.exp2
-rw-r--r--gdb/testsuite/gdb.base/whatis-exp.exp2
-rw-r--r--gdb/testsuite/gdb.base/whatis-ptype-typedefs.exp4
-rw-r--r--gdb/testsuite/gdb.base/whatis.exp6
216 files changed, 435 insertions, 435 deletions
diff --git a/gdb/testsuite/gdb.base/a2-run.exp b/gdb/testsuite/gdb.base/a2-run.exp
index 0b81433..5c94bec 100644
--- a/gdb/testsuite/gdb.base/a2-run.exp
+++ b/gdb/testsuite/gdb.base/a2-run.exp
@@ -124,7 +124,7 @@ if {$res == 0} {
# The remaining tests don't work for targets can't take arguments...
-if [target_info exists noargs] then {
+if {[target_info exists noargs]} {
verbose "Skipping rest of a2-run.exp because of noargs."
return
}
@@ -166,7 +166,7 @@ gdb_test_stdio "" "720" "" "run \"$testfile\" again after setting args"
# GOAL: Test that shell is being used with "run". For remote debugging
# targets, there is no guarantee that a "shell" (whatever that is) is used.
-if ![is_remote target] then {
+if {![is_remote target]} {
gdb_test_stdio "run `echo 8`" \
"40320" "" "run \"$testfile\" with shell"
}
diff --git a/gdb/testsuite/gdb.base/advance.exp b/gdb/testsuite/gdb.base/advance.exp
index cbc7515..10f8117 100644
--- a/gdb/testsuite/gdb.base/advance.exp
+++ b/gdb/testsuite/gdb.base/advance.exp
@@ -21,7 +21,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/alias.exp b/gdb/testsuite/gdb.base/alias.exp
index d73a218..98f660a 100644
--- a/gdb/testsuite/gdb.base/alias.exp
+++ b/gdb/testsuite/gdb.base/alias.exp
@@ -32,7 +32,7 @@ proc test_abbrev_not_present { alias_name } {
exp_continue
}
-re ".*$gdb_prompt $" {
- if { !$alias_present } then {
+ if {!$alias_present} {
pass $test_name
} else {
fail $test_name
diff --git a/gdb/testsuite/gdb.base/all-bin.exp b/gdb/testsuite/gdb.base/all-bin.exp
index cf53cd7..2bb9cfe 100644
--- a/gdb/testsuite/gdb.base/all-bin.exp
+++ b/gdb/testsuite/gdb.base/all-bin.exp
@@ -37,7 +37,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
# 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.base/annota-input-while-running.exp b/gdb/testsuite/gdb.base/annota-input-while-running.exp
index 2b4c5e1..2eff5be 100644
--- a/gdb/testsuite/gdb.base/annota-input-while-running.exp
+++ b/gdb/testsuite/gdb.base/annota-input-while-running.exp
@@ -24,7 +24,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug] == -1} {
# Because runto_main doesn't know how to handle the prompt with annotations,
# run to main before we set the annotation level.
-if ![runto_main] then {
+if {![runto_main]} {
return 1
}
diff --git a/gdb/testsuite/gdb.base/annota1.exp b/gdb/testsuite/gdb.base/annota1.exp
index 8060d3c..675f3af 100644
--- a/gdb/testsuite/gdb.base/annota1.exp
+++ b/gdb/testsuite/gdb.base/annota1.exp
@@ -501,7 +501,7 @@ proc thread_test {} {
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
- if { ![runto_main] } then {
+ if {![runto_main]} {
return
}
diff --git a/gdb/testsuite/gdb.base/anon.exp b/gdb/testsuite/gdb.base/anon.exp
index 83db599..8d67b8e 100644
--- a/gdb/testsuite/gdb.base/anon.exp
+++ b/gdb/testsuite/gdb.base/anon.exp
@@ -20,7 +20,7 @@ if { [prepare_for_testing "failed to prepare" $testfile $srcfile {debug}] } {
return -1
}
-if { ![runto_main] } then {
+if {![runto_main]} {
return
}
diff --git a/gdb/testsuite/gdb.base/arithmet.exp b/gdb/testsuite/gdb.base/arithmet.exp
index 4905c2e..4fa2ab2 100644
--- a/gdb/testsuite/gdb.base/arithmet.exp
+++ b/gdb/testsuite/gdb.base/arithmet.exp
@@ -37,7 +37,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug nowarning
# 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.base/arrayidx.exp b/gdb/testsuite/gdb.base/arrayidx.exp
index 7df0334..677e4f0 100644
--- a/gdb/testsuite/gdb.base/arrayidx.exp
+++ b/gdb/testsuite/gdb.base/arrayidx.exp
@@ -26,7 +26,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debu
clean_restart ${binfile}
-if ![runto_main] then {
+if {![runto_main]} {
perror "couldn't run to breakpoint"
return
}
diff --git a/gdb/testsuite/gdb.base/assign.exp b/gdb/testsuite/gdb.base/assign.exp
index a0dd46d..526e063 100644
--- a/gdb/testsuite/gdb.base/assign.exp
+++ b/gdb/testsuite/gdb.base/assign.exp
@@ -40,7 +40,7 @@ clean_restart ${binfile}
# 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.base/async.exp b/gdb/testsuite/gdb.base/async.exp
index 83e56e7..7630581 100644
--- a/gdb/testsuite/gdb.base/async.exp
+++ b/gdb/testsuite/gdb.base/async.exp
@@ -27,7 +27,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
#
# set it up at a breakpoint so we can play with it
#
-if ![runto_main] then {
+if {![runto_main]} {
perror "couldn't run to breakpoint"
return
}
diff --git a/gdb/testsuite/gdb.base/attach-wait-input.exp b/gdb/testsuite/gdb.base/attach-wait-input.exp
index 2f02c14..b4b19ac 100644
--- a/gdb/testsuite/gdb.base/attach-wait-input.exp
+++ b/gdb/testsuite/gdb.base/attach-wait-input.exp
@@ -47,7 +47,7 @@ proc start_program {binfile} {
clean_restart $binfile
- if ![runto setup_done] then {
+ if {![runto setup_done]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/attach.exp b/gdb/testsuite/gdb.base/attach.exp
index cfe806b..453fdbc 100644
--- a/gdb/testsuite/gdb.base/attach.exp
+++ b/gdb/testsuite/gdb.base/attach.exp
@@ -453,7 +453,7 @@ proc_with_prefix do_command_attach_tests {} {
global gdb_prompt
global binfile
- if ![isnative] then {
+ if {![isnative]} {
unsupported "command attach test"
return 0
}
diff --git a/gdb/testsuite/gdb.base/auto-connect-native-target.exp b/gdb/testsuite/gdb.base/auto-connect-native-target.exp
index 9422046..b60cf8f 100644
--- a/gdb/testsuite/gdb.base/auto-connect-native-target.exp
+++ b/gdb/testsuite/gdb.base/auto-connect-native-target.exp
@@ -68,7 +68,7 @@ if { $topmost != "exec" } {
# Check which target this board connects to. If testing with a native
# target board, this should cause the native target to auto connect.
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/auxv.exp b/gdb/testsuite/gdb.base/auxv.exp
index 390f559..a1bb38d 100644
--- a/gdb/testsuite/gdb.base/auxv.exp
+++ b/gdb/testsuite/gdb.base/auxv.exp
@@ -56,7 +56,7 @@ if {$core_works} {
}
}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
set print_core_line [gdb_get_line_number "ABORT;"]
diff --git a/gdb/testsuite/gdb.base/backtrace.exp b/gdb/testsuite/gdb.base/backtrace.exp
index dec4ed6..6e58428 100644
--- a/gdb/testsuite/gdb.base/backtrace.exp
+++ b/gdb/testsuite/gdb.base/backtrace.exp
@@ -21,7 +21,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.base/bfp-test.exp b/gdb/testsuite/gdb.base/bfp-test.exp
index 0728259..1741521 100644
--- a/gdb/testsuite/gdb.base/bfp-test.exp
+++ b/gdb/testsuite/gdb.base/bfp-test.exp
@@ -25,7 +25,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debu
clean_restart ${binfile}
-if ![runto_main] then {
+if {![runto_main]} {
perror "couldn't run to breakpoint"
return
}
diff --git a/gdb/testsuite/gdb.base/bigcore.exp b/gdb/testsuite/gdb.base/bigcore.exp
index 13b70f7..8acb716 100644
--- a/gdb/testsuite/gdb.base/bigcore.exp
+++ b/gdb/testsuite/gdb.base/bigcore.exp
@@ -20,7 +20,7 @@
# Are we on a target board? As of 2004-02-12, GDB didn't have a
# mechanism that would let it efficiently access a remote corefile.
-if ![isnative] then {
+if {![isnative]} {
untested "remote system"
return
}
@@ -55,7 +55,7 @@ gdb_test_no_output "set width 0"
# Get the core into the output directory.
set_inferior_cwd_to_output_dir
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
set print_core_line [gdb_get_line_number "Dump core"]
diff --git a/gdb/testsuite/gdb.base/bitfields2.exp b/gdb/testsuite/gdb.base/bitfields2.exp
index f71ca42..5b89455 100644
--- a/gdb/testsuite/gdb.base/bitfields2.exp
+++ b/gdb/testsuite/gdb.base/bitfields2.exp
@@ -160,7 +160,7 @@ proc bitfield_signedness {} {
}
set test "most negative signed bitfield values"
- if $has_signed_bitfields then {
+ if {$has_signed_bitfields} {
gdb_test "print flags" "u1 = 0, u2 = 0, u3 = 0, s1 = -16384, s2 = -4294967296, s3 = -32768.*" $test
} else {
unsupported $test
@@ -169,7 +169,7 @@ proc bitfield_signedness {} {
continue_test break4 "#2"
set test "signed bitfields containing -1"
- if $has_signed_bitfields then {
+ if {$has_signed_bitfields} {
gdb_test "print flags" "u1 = 0, u2 = 0, u3 = 0, s1 = -1, s2 = -1, s3 = -1.*" $test
} else {
unsupported $test
@@ -212,7 +212,7 @@ proc bitfield_set {} {
gdb_test "print flags" "u1 = 0, u2 = 4294967296, u3 = 0, s1 = 0, s2 = 2147483648, s3 = 0.*" "long long bitfield values after set"
set test "set long long signed bitfield negative"
- if $has_signed_bitfields then {
+ if {$has_signed_bitfields} {
gdb_test_multiple "print flags.s2 = -1" $test {
-re "warning: Value does not fit.*$gdb_prompt $" {
fail "$test"
@@ -226,7 +226,7 @@ proc bitfield_set {} {
}
set test "long long bitfield values after set negative"
- if $has_signed_bitfields then {
+ if {$has_signed_bitfields} {
gdb_test "print flags" "u1 = 0, u2 = 4294967296, u3 = 0, s1 = 0, s2 = -1, s3 = 0.*" $test
} else {
unsupported $test
diff --git a/gdb/testsuite/gdb.base/bp-permanent.exp b/gdb/testsuite/gdb.base/bp-permanent.exp
index 1ad9a69..5997b56 100644
--- a/gdb/testsuite/gdb.base/bp-permanent.exp
+++ b/gdb/testsuite/gdb.base/bp-permanent.exp
@@ -44,7 +44,7 @@ proc test {always_inserted sw_watchpoint} {
clean_restart $binfile
- if ![runto_main] then {
+ if {![runto_main]} {
return -1
}
diff --git a/gdb/testsuite/gdb.base/break-idempotent.exp b/gdb/testsuite/gdb.base/break-idempotent.exp
index 837ac00..b350010 100644
--- a/gdb/testsuite/gdb.base/break-idempotent.exp
+++ b/gdb/testsuite/gdb.base/break-idempotent.exp
@@ -115,7 +115,7 @@ proc test_break { always_inserted break_command } {
with_test_prefix "$cmd" {
delete_breakpoints
- if ![runto_main] then {
+ if {![runto_main]} {
return
}
diff --git a/gdb/testsuite/gdb.base/break-unload-file.exp b/gdb/testsuite/gdb.base/break-unload-file.exp
index ed14772..83edaed 100644
--- a/gdb/testsuite/gdb.base/break-unload-file.exp
+++ b/gdb/testsuite/gdb.base/break-unload-file.exp
@@ -59,7 +59,7 @@ proc test_break { initial_load always_inserted break_command } {
gdb_reload
set GDBFLAGS $saved_gdbflags
- if ![runto_main] then {
+ if {![runto_main]} {
return
}
diff --git a/gdb/testsuite/gdb.base/break.exp b/gdb/testsuite/gdb.base/break.exp
index 258c468..7ef588e 100644
--- a/gdb/testsuite/gdb.base/break.exp
+++ b/gdb/testsuite/gdb.base/break.exp
@@ -161,7 +161,7 @@ proc_with_prefix test_break {} {
exp_continue
}
-re ".*$::gdb_prompt $" {
- if { !$see1 && $see2 && !$see3 && $see4 && !$see5 && $see6 } then {
+ if {!$see1 && $see2 && !$see3 && $see4 && !$see5 && $see6} {
pass "info break 2 4 6"
} else {
fail "info break 2 4 6"
@@ -202,7 +202,7 @@ proc_with_prefix test_break {} {
exp_continue
}
-re ".*$::gdb_prompt $" {
- if { !$see1 && !$see2 && $see3 && $see4 && $see5 && !$see6 } then {
+ if {!$see1 && !$see2 && $see3 && $see4 && $see5 && !$see6} {
pass "info break 3-5"
} else {
fail "info break 3-5"
@@ -260,7 +260,7 @@ proc_with_prefix test_break {} {
exp_continue
}
-re ".*$::gdb_prompt $" {
- if { $see1 && $see2 && $see3 && $see4 && $see5 && $see6 } then {
+ if {$see1 && $see2 && $see3 && $see4 && $see5 && $see6} {
pass "check disable with history values"
} else {
fail "check disable with history values"
@@ -308,7 +308,7 @@ proc_with_prefix test_break {} {
exp_continue
}
-re ".*$::gdb_prompt $" {
- if { $see1 && $see2 && $see3 && $see4 && $see5 && $see6 } then {
+ if {$see1 && $see2 && $see3 && $see4 && $see5 && $see6} {
pass "check disable with convenience values"
} else {
fail "check disable with convenience values"
@@ -458,7 +458,7 @@ test_tbreak
proc_with_prefix test_no_break_on_catchpoint {} {
clean_restart break
- if ![runto_main] then {
+ if {![runto_main]} {
return
}
@@ -482,7 +482,7 @@ test_no_break_on_catchpoint
proc_with_prefix test_break_nonexistent_line {} {
clean_restart break
- if ![runto_main] then {
+ if {![runto_main]} {
return
}
@@ -497,7 +497,7 @@ test_break_nonexistent_line
proc_with_prefix test_break_default {} {
clean_restart break
- if ![runto_main] then {
+ if {![runto_main]} {
return
}
@@ -541,7 +541,7 @@ test_break_default
proc_with_prefix test_break_silent_and_more {} {
clean_restart break
- if ![runto_main] then {
+ if {![runto_main]} {
return
}
@@ -686,7 +686,7 @@ test_break_user_call
proc_with_prefix test_finish_arguments {} {
clean_restart break
- if ![runto_main] then {
+ if {![runto_main]} {
return
}
diff --git a/gdb/testsuite/gdb.base/bt-on-error-and-warning.exp b/gdb/testsuite/gdb.base/bt-on-error-and-warning.exp
index 0dfd13c..a9026e1 100644
--- a/gdb/testsuite/gdb.base/bt-on-error-and-warning.exp
+++ b/gdb/testsuite/gdb.base/bt-on-error-and-warning.exp
@@ -25,7 +25,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} {
# Check we can run to main. If this works this time then we just
# assume that it will work later on (when we repeatedly restart GDB).
-if ![runto_main] then {
+if {![runto_main]} {
return -1
}
diff --git a/gdb/testsuite/gdb.base/bt-on-fatal-signal.exp b/gdb/testsuite/gdb.base/bt-on-fatal-signal.exp
index 1af88d5..bd5e46b 100644
--- a/gdb/testsuite/gdb.base/bt-on-fatal-signal.exp
+++ b/gdb/testsuite/gdb.base/bt-on-fatal-signal.exp
@@ -34,7 +34,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} {
# Check we can run to main. If this works this time then we just
# assume that it will work later on (when we repeatedly restart GDB).
-if ![runto_main] then {
+if {![runto_main]} {
return -1
}
diff --git a/gdb/testsuite/gdb.base/bt-selected-frame.exp b/gdb/testsuite/gdb.base/bt-selected-frame.exp
index e1018e4..912b875 100644
--- a/gdb/testsuite/gdb.base/bt-selected-frame.exp
+++ b/gdb/testsuite/gdb.base/bt-selected-frame.exp
@@ -28,7 +28,7 @@ proc check_selected_frame_after_bt { bt_cmd stack_pattern } {
with_test_prefix $bt_cmd {
- if ![runto_main] then {
+ if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/call-ar-st.exp b/gdb/testsuite/gdb.base/call-ar-st.exp
index 2da438c..a5599d7 100644
--- a/gdb/testsuite/gdb.base/call-ar-st.exp
+++ b/gdb/testsuite/gdb.base/call-ar-st.exp
@@ -44,7 +44,7 @@ gdb_test_no_output "set print address off"
gdb_test_no_output "set width 0"
-if ![runto_main] then {
+if {![runto_main]} {
perror "couldn't run to breakpoint"
return
}
@@ -432,7 +432,7 @@ if {!$skip_float_test && \
# On 32-bit SPARC, some of the args are passed by ref, others by
# value, and GDB gets confused and says "Invalid cast" because it
# thinks it has to cast the structure into a pointer to structure.
- if { [test_debug_format "stabs"] } then {
+ if {[test_debug_format "stabs"]} {
setup_kfail "gdb/1539" "sparc-*-*"
}
diff --git a/gdb/testsuite/gdb.base/call-rt-st.exp b/gdb/testsuite/gdb.base/call-rt-st.exp
index 00af32c..63792ee 100644
--- a/gdb/testsuite/gdb.base/call-rt-st.exp
+++ b/gdb/testsuite/gdb.base/call-rt-st.exp
@@ -45,7 +45,7 @@ gdb_test_no_output "set print address off"
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.base/call-sc.exp b/gdb/testsuite/gdb.base/call-sc.exp
index ddf2cee..46da650 100644
--- a/gdb/testsuite/gdb.base/call-sc.exp
+++ b/gdb/testsuite/gdb.base/call-sc.exp
@@ -61,7 +61,7 @@ proc start_scalars_test { type } {
}
# Advance to main
- if { ![runto_main] } then {
+ if {![runto_main]} {
return
}
diff --git a/gdb/testsuite/gdb.base/call-strs.exp b/gdb/testsuite/gdb.base/call-strs.exp
index 58cb3cd..f933581 100644
--- a/gdb/testsuite/gdb.base/call-strs.exp
+++ b/gdb/testsuite/gdb.base/call-strs.exp
@@ -42,7 +42,7 @@ gdb_test_no_output "set print address off"
gdb_test_no_output "set print symbol off"
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.base/callfuncs.exp b/gdb/testsuite/gdb.base/callfuncs.exp
index 44289ee..9b98f68 100644
--- a/gdb/testsuite/gdb.base/callfuncs.exp
+++ b/gdb/testsuite/gdb.base/callfuncs.exp
@@ -368,7 +368,7 @@ proc perform_all_tests {prototypes} {
# Check if all registers still have the same value.
set new_reg_content [fetch_all_registers \
"register contents after gdb function calls"]
- if {$old_reg_content == $new_reg_content} then {
+ if {$old_reg_content == $new_reg_content} {
pass "gdb function calls preserve register contents"
} else {
set old_reg_content $new_reg_content
@@ -394,7 +394,7 @@ proc perform_all_tests {prototypes} {
"bt after continuing from call dummy breakpoint"] then {
set new_reg_content [fetch_all_registers \
"register contents after stop in call dummy"]
- if {$old_reg_content == $new_reg_content} then {
+ if {$old_reg_content == $new_reg_content} {
pass "continue after stop in call dummy preserves register contents"
} else {
fail "continue after stop in call dummy preserves register contents"
@@ -420,7 +420,7 @@ proc perform_all_tests {prototypes} {
"bt after finishing from call dummy breakpoint"] then {
set new_reg_content [fetch_all_registers \
"register contents after finish in call dummy"]
- if {$old_reg_content == $new_reg_content} then {
+ if {$old_reg_content == $new_reg_content} {
pass "finish after stop in call dummy preserves register contents"
} else {
fail "finish after stop in call dummy preserves register contents"
@@ -445,7 +445,7 @@ proc perform_all_tests {prototypes} {
"y"] then {
set new_reg_content [fetch_all_registers \
"register contents after return in call dummy"]
- if {$old_reg_content == $new_reg_content} then {
+ if {$old_reg_content == $new_reg_content} {
pass "return after stop in call dummy preserves register contents"
} else {
fail "return after stop in call dummy preserves register contents"
@@ -508,7 +508,7 @@ proc perform_all_tests {prototypes} {
set new_reg_content [fetch_all_registers \
"register contents after nested call dummies"]
- if {$old_reg_content == $new_reg_content} then {
+ if {$old_reg_content == $new_reg_content} {
pass "nested call dummies preserve register contents"
} else {
fail "nested call dummies preserve register contents"
diff --git a/gdb/testsuite/gdb.base/catch-fork-static.exp b/gdb/testsuite/gdb.base/catch-fork-static.exp
index 51031a8..07f0595 100644
--- a/gdb/testsuite/gdb.base/catch-fork-static.exp
+++ b/gdb/testsuite/gdb.base/catch-fork-static.exp
@@ -23,7 +23,7 @@
# Until "catch fork" is implemented on other targets...
#
-if { ![istarget "*-*-linux*"] && ![istarget "*-*-openbsd*"] } then {
+if {![istarget "*-*-linux*"] && ![istarget "*-*-openbsd*"]} {
return
}
diff --git a/gdb/testsuite/gdb.base/catch-signal-siginfo-cond.exp b/gdb/testsuite/gdb.base/catch-signal-siginfo-cond.exp
index 85a55b2..c18c5fb 100644
--- a/gdb/testsuite/gdb.base/catch-signal-siginfo-cond.exp
+++ b/gdb/testsuite/gdb.base/catch-signal-siginfo-cond.exp
@@ -41,7 +41,7 @@ if { [prepare_for_testing "failed to prepare" "${testfile}" $srcfile {debug}] }
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return -1
}
diff --git a/gdb/testsuite/gdb.base/catch-syscall.exp b/gdb/testsuite/gdb.base/catch-syscall.exp
index d8b6898..2364b47 100644
--- a/gdb/testsuite/gdb.base/catch-syscall.exp
+++ b/gdb/testsuite/gdb.base/catch-syscall.exp
@@ -26,7 +26,7 @@ if { [prepare_for_testing "failed to prepare" $testfile ${testfile}.c] } {
}
# Check target supports catch syscall or not.
-if ![runto_main] then {
+if {![runto_main]} {
return
}
@@ -464,40 +464,40 @@ proc do_syscall_tests {} {
# Testing the 'catch syscall' command without arguments.
# This test should catch any syscalls.
- if [runto_main] then { test_catch_syscall_without_args }
+ if {[runto_main]} { test_catch_syscall_without_args }
# Testing the 'catch syscall' command with arguments.
# This test should only catch the specified syscall.
- if [runto_main] then { test_catch_syscall_with_args }
+ if {[runto_main]} { test_catch_syscall_with_args }
# Testing the 'catch syscall' command with many arguments.
# This test should catch $all_syscalls.
- if [runto_main] then { test_catch_syscall_with_many_args }
+ if {[runto_main]} { test_catch_syscall_with_many_args }
# Testing the 'catch syscall' command with WRONG arguments.
# This test should not trigger any catchpoints.
- if [runto_main] then { test_catch_syscall_with_wrong_args }
+ if {[runto_main]} { test_catch_syscall_with_wrong_args }
# Testing the 'catch syscall' command during a restart of
# the inferior.
- if [runto_main] then { test_catch_syscall_restarting_inferior }
+ if {[runto_main]} { test_catch_syscall_restarting_inferior }
# Testing the 'catch syscall' command toggling off past a
# syscall return, then resuming entry/return as normal.
- if [runto_main] then { test_catch_syscall_skipping_return }
+ if {[runto_main]} { test_catch_syscall_skipping_return }
# Testing the 'catch syscall' command starting mid-vfork.
- if [runto_main] then { test_catch_syscall_mid_vfork }
+ if {[runto_main]} { test_catch_syscall_mid_vfork }
# Testing that 'catch syscall' entry/return tracks across execve.
- if [runto_main] then { test_catch_syscall_execve }
+ if {[runto_main]} { test_catch_syscall_execve }
# Testing if the 'catch syscall' command works when switching to
# different architectures on-the-fly (PR gdb/10737).
- if [runto_main] then { test_catch_syscall_multi_arch }
+ if {[runto_main]} { test_catch_syscall_multi_arch }
# Testing the 'catch' syscall command for a group of syscalls.
- if [runto_main] then { test_catch_syscall_group }
+ if {[runto_main]} { test_catch_syscall_group }
}
proc test_catch_syscall_without_args_noxml {} {
@@ -662,16 +662,16 @@ proc do_syscall_tests_without_xml {} {
# Let's test if we can catch syscalls without XML support.
# We should succeed, but GDB is not supposed to print syscall names.
- if [runto_main] then { test_catch_syscall_without_args_noxml }
+ if {[runto_main]} { test_catch_syscall_without_args_noxml }
# The only valid argument "catch syscall" should accept is the
# syscall number, and not the name (since it can't translate a
# name to a number).
- if [runto_main] then { test_catch_syscall_with_args_noxml }
+ if {[runto_main]} { test_catch_syscall_with_args_noxml }
# Now, we'll try to provide a syscall name (valid or not) to the command,
# and expect it to fail.
- if [runto_main] then { test_catch_syscall_with_wrong_args_noxml }
+ if {[runto_main]} { test_catch_syscall_with_wrong_args_noxml }
}
# This procedure fills the vector "all_syscalls_numbers" with the proper
diff --git a/gdb/testsuite/gdb.base/checkpoint.exp b/gdb/testsuite/gdb.base/checkpoint.exp
index e81e4f4..0fef9c5 100644
--- a/gdb/testsuite/gdb.base/checkpoint.exp
+++ b/gdb/testsuite/gdb.base/checkpoint.exp
@@ -16,7 +16,7 @@
# Until "set follow-fork-mode" and "catch fork" are implemented on
# other targets...
#
-if {![istarget "*-*-linux*"]} then {
+if {![istarget "*-*-linux*"]} {
return
}
diff --git a/gdb/testsuite/gdb.base/clear_non_user_bp.exp b/gdb/testsuite/gdb.base/clear_non_user_bp.exp
index da69435..2995f0d 100644
--- a/gdb/testsuite/gdb.base/clear_non_user_bp.exp
+++ b/gdb/testsuite/gdb.base/clear_non_user_bp.exp
@@ -49,7 +49,7 @@ if { [gdb_compile "${srcdir}/${subdir}/main.c" "${binfile}" executable {debug}]
# Start with a fresh gdb.
clean_restart ${binfile}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/compare-sections.exp b/gdb/testsuite/gdb.base/compare-sections.exp
index d9d10d4..9885b0c 100644
--- a/gdb/testsuite/gdb.base/compare-sections.exp
+++ b/gdb/testsuite/gdb.base/compare-sections.exp
@@ -79,7 +79,7 @@ gdb_test_multiple $command $test {
}
# Now get past startup code.
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp
index e3803c9..2a46d4f 100644
--- a/gdb/testsuite/gdb.base/completion.exp
+++ b/gdb/testsuite/gdb.base/completion.exp
@@ -57,7 +57,7 @@ if {[prepare_for_testing "failed to prepare" $testfile \
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
perror "tests suppressed"
}
diff --git a/gdb/testsuite/gdb.base/complex-parts.exp b/gdb/testsuite/gdb.base/complex-parts.exp
index 7fa94c7..0075b83 100644
--- a/gdb/testsuite/gdb.base/complex-parts.exp
+++ b/gdb/testsuite/gdb.base/complex-parts.exp
@@ -19,7 +19,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
return -1
}
-if { ![runto_main] } then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/complex.exp b/gdb/testsuite/gdb.base/complex.exp
index e2c6002..5d97c87 100644
--- a/gdb/testsuite/gdb.base/complex.exp
+++ b/gdb/testsuite/gdb.base/complex.exp
@@ -20,16 +20,16 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
return -1
}
-if [runto f2] then {
+if {[runto f2]} {
get_debug_format
- if { [test_compiler_info gcc-2-*] && [test_debug_format "DWARF \[0-9\]"] } then {
+ if {[test_compiler_info gcc-2-*] && [test_debug_format "DWARF \[0-9\]"]} {
setup_xfail "*-*-*"
}
gdb_test "p *y" "\\\$\[0-9\]* = \{c = 42 '\\*', f = 1 \\+ 0i\}" \
"print complex packed value in C"
}
-if [runto f4] then {
+if {[runto f4]} {
gdb_test "p *y" "\\\$\[0-9\]* = \{c = 42 '\\*', f = 1 \\+ 0i\}" \
"print complex value in C"
}
diff --git a/gdb/testsuite/gdb.base/cond-eval-mode.exp b/gdb/testsuite/gdb.base/cond-eval-mode.exp
index f6e8b3e..61c28b5 100644
--- a/gdb/testsuite/gdb.base/cond-eval-mode.exp
+++ b/gdb/testsuite/gdb.base/cond-eval-mode.exp
@@ -29,7 +29,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/cond-expr.exp b/gdb/testsuite/gdb.base/cond-expr.exp
index f0c4c32..36754f9 100644
--- a/gdb/testsuite/gdb.base/cond-expr.exp
+++ b/gdb/testsuite/gdb.base/cond-expr.exp
@@ -42,7 +42,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
clean_restart ${binfile}
-if ![runto_main] then {
+if {![runto_main]} {
perror "couldn't run to breakpoint"
return
}
diff --git a/gdb/testsuite/gdb.base/condbreak-call-false.exp b/gdb/testsuite/gdb.base/condbreak-call-false.exp
index 2d0325d..4b1ed1b 100644
--- a/gdb/testsuite/gdb.base/condbreak-call-false.exp
+++ b/gdb/testsuite/gdb.base/condbreak-call-false.exp
@@ -22,7 +22,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/consecutive-step-over.exp b/gdb/testsuite/gdb.base/consecutive-step-over.exp
index 5cb1241..a8cecb5 100644
--- a/gdb/testsuite/gdb.base/consecutive-step-over.exp
+++ b/gdb/testsuite/gdb.base/consecutive-step-over.exp
@@ -24,7 +24,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/consecutive.exp b/gdb/testsuite/gdb.base/consecutive.exp
index 4b38de0..b517b42 100644
--- a/gdb/testsuite/gdb.base/consecutive.exp
+++ b/gdb/testsuite/gdb.base/consecutive.exp
@@ -26,7 +26,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug nowarning
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
perror "couldn't run to breakpoint"
return
}
@@ -55,7 +55,7 @@ gdb_test "break \*$bp_addr" "Breakpoint $decimal at $bp_addr: file .*" \
gdb_test_multiple "step" "stopped at bp, 2nd instr" {
-re -wrap "Breakpoint $decimal, ($hex) in foo.*" {
set stop_addr $expect_out(1,string)
- if [eval expr "$bp_addr == $stop_addr"] then {
+ if {[eval expr "$bp_addr == $stop_addr"]} {
pass "stopped at bp, 2nd instr"
} else {
fail "stopped at bp, 2nd instr (wrong address)"
@@ -64,9 +64,9 @@ gdb_test_multiple "step" "stopped at bp, 2nd instr" {
-re -wrap "Breakpoint $decimal, foo.*" {
set stop_addr [get_valueof "/x" "\$pc" "" "value of pc"]
set stop_addr_is_stmt [hex_in_list $stop_addr $is_stmt]
- if { ! $stop_addr_is_stmt } {
+ if {!$stop_addr_is_stmt} {
fail "stopped at bp, 2nd instr (missing hex prefix)"
- } elseif [eval expr "$bp_addr == $stop_addr"] then {
+ } elseif {[eval expr "$bp_addr == $stop_addr"]} {
pass "stopped at bp, 2nd instr"
} else {
fail "stopped at bp, 2nd instr (wrong address)"
diff --git a/gdb/testsuite/gdb.base/constvars.exp b/gdb/testsuite/gdb.base/constvars.exp
index 671baf6..8d1af0b 100644
--- a/gdb/testsuite/gdb.base/constvars.exp
+++ b/gdb/testsuite/gdb.base/constvars.exp
@@ -40,7 +40,7 @@ clean_restart ${binfile}
#
# 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
}
@@ -51,7 +51,7 @@ get_debug_format
# TODO: check out the hp side of this.
proc local_compiler_xfail_check { } {
- if { [test_compiler_info gcc-2-*] } then {
+ if {[test_compiler_info gcc-2-*]} {
if { ![test_debug_format "HP"] \
&& ![test_debug_format "DWARF \[0-9\]"] } then {
setup_xfail "*-*-*"
diff --git a/gdb/testsuite/gdb.base/coredump-filter.exp b/gdb/testsuite/gdb.base/coredump-filter.exp
index 14c3db4..499bfae 100644
--- a/gdb/testsuite/gdb.base/coredump-filter.exp
+++ b/gdb/testsuite/gdb.base/coredump-filter.exp
@@ -16,7 +16,7 @@
standard_testfile
# This test is Linux-only.
-if ![istarget *-*-linux*] then {
+if {![istarget *-*-linux*]} {
untested "coredump-filter.exp"
return -1
}
diff --git a/gdb/testsuite/gdb.base/corefile.exp b/gdb/testsuite/gdb.base/corefile.exp
index 0a44c2d..f15e1e9 100644
--- a/gdb/testsuite/gdb.base/corefile.exp
+++ b/gdb/testsuite/gdb.base/corefile.exp
@@ -17,7 +17,7 @@
# are we on a target board
-if ![isnative] then {
+if {![isnative]} {
return
}
@@ -49,7 +49,7 @@ if {$corefile == ""} {
# it a pass, but note that the program name is bad.
gdb_exit
-if $verbose>1 then {
+if {$verbose>1} {
send_user "Spawning $GDB $INTERNAL_GDBFLAGS $GDBFLAGS -core=$corefile\n"
}
@@ -82,7 +82,7 @@ expect {
close
-if $verbose>1 then {
+if {$verbose>1} {
send_user "Spawning $GDB $INTERNAL_GDBFLAGS $GDBFLAGS $binfile -core=$corefile\n"
}
diff --git a/gdb/testsuite/gdb.base/corefile2.exp b/gdb/testsuite/gdb.base/corefile2.exp
index 5ae681b..b08bd71 100644
--- a/gdb/testsuite/gdb.base/corefile2.exp
+++ b/gdb/testsuite/gdb.base/corefile2.exp
@@ -18,7 +18,7 @@
# coremaker2.c for details.
# are we on a target board
-if ![isnative] then {
+if {![isnative]} {
return
}
@@ -174,7 +174,7 @@ with_test_prefix "renamed binfile" {
clean_restart $binfile
-if ![runto_main] then {
+if {![runto_main]} {
return
}
diff --git a/gdb/testsuite/gdb.base/ctf-constvars.exp b/gdb/testsuite/gdb.base/ctf-constvars.exp
index a5e7fe0..4a8307e 100644
--- a/gdb/testsuite/gdb.base/ctf-constvars.exp
+++ b/gdb/testsuite/gdb.base/ctf-constvars.exp
@@ -46,7 +46,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \
#
# 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.base/ctf-ptype.exp b/gdb/testsuite/gdb.base/ctf-ptype.exp
index 28deabb..2e3b972 100644
--- a/gdb/testsuite/gdb.base/ctf-ptype.exp
+++ b/gdb/testsuite/gdb.base/ctf-ptype.exp
@@ -64,16 +64,16 @@ gdb_test "ptype struct t_struct" "type = struct t_struct \{.*\[\r\n\] (unsign
# Test the equivalence between '.' and '->' for struct member references.
-if [gdb_test "ptype v_struct1.v_float_member" "type = float"]<0 then {
+if {[gdb_test "ptype v_struct1.v_float_member" "type = float"] < 0} {
return -1
}
-if [gdb_test "ptype v_struct1->v_float_member" "type = float"]<0 then {
+if {[gdb_test "ptype v_struct1->v_float_member" "type = float"] < 0} {
return -1
}
-if [gdb_test "ptype v_t_struct_p.v_float_member" "type = float"]<0 then {
+if {[gdb_test "ptype v_t_struct_p.v_float_member" "type = float"] < 0} {
return -1
}
-if [gdb_test "ptype v_t_struct_p->v_float_member" "type = float"]<0 then {
+if {[gdb_test "ptype v_t_struct_p->v_float_member" "type = float"] < 0} {
return -1
}
@@ -278,7 +278,7 @@ ptype_maybe_prototyped "fffptr" "int (*(*(*)(char))(short int))(long int)" \
# requires a running process. These call malloc, and can take a long
# time to execute over a slow serial link, so increase the timeout.
-if [runto_main] then {
+if {[runto_main]} {
if [target_info exists gdb,cannot_call_functions] {
unsupported "this target can not call functions"
diff --git a/gdb/testsuite/gdb.base/decl-before-def.exp b/gdb/testsuite/gdb.base/decl-before-def.exp
index c4120a2..206d5e3 100644
--- a/gdb/testsuite/gdb.base/decl-before-def.exp
+++ b/gdb/testsuite/gdb.base/decl-before-def.exp
@@ -25,7 +25,7 @@ gdb_test "maint expand-symtabs"
gdb_test "p a" { = \{1, 2\}} "no running process: p a"
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/default.exp b/gdb/testsuite/gdb.base/default.exp
index f3e4b28..20cbab2 100644
--- a/gdb/testsuite/gdb.base/default.exp
+++ b/gdb/testsuite/gdb.base/default.exp
@@ -184,7 +184,7 @@ gdb_expect {
}
-re "exec-file.*A program is being debugged already. Kill it. .y or n.*$" {
send_gdb "n\n"
- if $verbose>1 then {
+ if {$verbose > 1} {
send_user "\tDidn't kill program being debugged\n"
}
gdb_expect -re "$gdb_prompt $" { }
@@ -208,7 +208,7 @@ gdb_expect {
{ pass "file" }
-re ".*A program is being debugged already. Kill it. .y or n.*$" {
send_gdb "n\n"
- if $verbose>1 then {
+ if {$verbose > 1} {
send_user "\t\tDidn't kill program being debugged\n"
}
gdb_expect -re "$gdb_prompt $" { }
@@ -748,7 +748,7 @@ gdb_expect {
-re "No core file specified..*$gdb_prompt $" { pass "target core" }
-re ".*A program is being debugged already. Kill it. .y or n.*$" {
send_gdb "n\n"
- if $verbose>1 then {
+ if {$verbose > 1} {
send_user "\t\tDidn't kill program being debugged\n"
}
gdb_expect -re "$gdb_prompt $" { }
@@ -766,7 +766,7 @@ gdb_expect {
{ pass "target exec" }
-re ".*A program is being debugged already. Kill it. .y or n.*$" {
send_gdb "n\n"
- if $verbose>1 then {
+ if {$verbose > 1} {
send_user "\t\tDidn't kill program being debugged\n"
}
gdb_expect -re "$gdb_prompt $" { }
@@ -783,7 +783,7 @@ gdb_expect {
{ pass "target remote" }
-re ".*A program is being debugged already. Kill it. .y or n.*$" {
send_gdb "n\n"
- if $verbose>1 then {
+ if {$verbose > 1} {
send_user "\t\tDidn't kill program being debugged\n"
}
gdb_expect -re "$gdb_prompt $" { }
diff --git a/gdb/testsuite/gdb.base/define.exp b/gdb/testsuite/gdb.base/define.exp
index 52a4f0d..e561634 100644
--- a/gdb/testsuite/gdb.base/define.exp
+++ b/gdb/testsuite/gdb.base/define.exp
@@ -30,7 +30,7 @@ if {[prepare_for_testing "failed to prepare" ${testfile} \
set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
set bp_location11 [gdb_get_line_number "set breakpoint 11 here"]
-if ![runto_main] then {
+if {![runto_main]} {
return
}
diff --git a/gdb/testsuite/gdb.base/dfp-test.exp b/gdb/testsuite/gdb.base/dfp-test.exp
index 3079521..0d7314f 100644
--- a/gdb/testsuite/gdb.base/dfp-test.exp
+++ b/gdb/testsuite/gdb.base/dfp-test.exp
@@ -30,7 +30,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {quie
clean_restart ${binfile}
-if ![runto_main] then {
+if {![runto_main]} {
perror "couldn't run to breakpoint"
return
}
diff --git a/gdb/testsuite/gdb.base/disabled-location.exp b/gdb/testsuite/gdb.base/disabled-location.exp
index d90bc5b..1fc2e15 100644
--- a/gdb/testsuite/gdb.base/disabled-location.exp
+++ b/gdb/testsuite/gdb.base/disabled-location.exp
@@ -19,7 +19,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile}] } {
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/display.exp b/gdb/testsuite/gdb.base/display.exp
index b26c084..d8ca284 100644
--- a/gdb/testsuite/gdb.base/display.exp
+++ b/gdb/testsuite/gdb.base/display.exp
@@ -60,7 +60,7 @@ if !$use_gdb_stub {
# Ok, on to real life
#
-if ![runto_main] then {
+if {![runto_main]} {
return
}
diff --git a/gdb/testsuite/gdb.base/dprintf-detach.exp b/gdb/testsuite/gdb.base/dprintf-detach.exp
index b6da01a..6c71c61 100644
--- a/gdb/testsuite/gdb.base/dprintf-detach.exp
+++ b/gdb/testsuite/gdb.base/dprintf-detach.exp
@@ -21,7 +21,7 @@
load_lib gdbserver-support.exp
# The test relies on "detach/attach".
-if { [use_gdb_stub] } then {
+if {[use_gdb_stub]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/dump.exp b/gdb/testsuite/gdb.base/dump.exp
index c7dd1b1..1efc3c8 100644
--- a/gdb/testsuite/gdb.base/dump.exp
+++ b/gdb/testsuite/gdb.base/dump.exp
@@ -26,7 +26,7 @@ set endian "auto"
set formats {binary ihex srec tekhex verilog}
-if [istarget "alpha*-*-*"] then {
+if {[istarget "alpha*-*-*"]} {
# SREC etc cannot handle 64-bit addresses. Force the test
# program into the low 31 bits of the address space.
lappend options "ldflags=-Wl,-taso"
@@ -68,7 +68,7 @@ gdb_load ${binfile}
# IHEX and TEKHEX. We skip those tests then.
set max_32bit_address "0xffffffff"
set data_address [get_hexadecimal_valueof "&intarray" 0x100000000]
-if {${data_address} > ${max_32bit_address}} then {
+if {${data_address} > ${max_32bit_address}} {
set is64bitonly "yes"
}
@@ -105,7 +105,7 @@ remote_exec host "rm -f $filenames"
# Run target program until data structs are initialized.
-if { ! [ runto checkpoint1 ] } then {
+if {![runto checkpoint1]} {
untested "couldn't run to checkpoint"
return -1
}
@@ -283,7 +283,7 @@ proc test_restore_saved_value { restore_args msg oldval newval } {
}
}
-if ![string compare $is64bitonly "no"] then {
+if {![string compare $is64bitonly "no"]} {
test_restore_saved_value "[set intarr1.srec]" "array as value, srec" \
@@ -365,7 +365,7 @@ set struct2_offset \
print_zero_all
-if ![string compare $is64bitonly "no"] then {
+if {![string compare $is64bitonly "no"]} {
test_restore_saved_value "[set intarr1.srec] $array2_offset" \
"array copy, srec" \
$array_val "intarray2"
@@ -421,7 +421,7 @@ set element3_offset \
set element4_offset \
[capture_value "/x (char *) &intarray\[4\] - (char *) &intarray\[0\]"]
-if ![string compare $is64bitonly "no"] then {
+if {![string compare $is64bitonly "no"]} {
print_zero_all
test_restore_saved_value "[set intarr1.srec] 0 $element3_start $element4_start" \
@@ -456,7 +456,7 @@ test_restore_saved_value \
gdb_test "print intarray\[2\] == 0" " = 1" "element 2 not changed - 4"
gdb_test "print intarray\[4\] == 0" " = 1" "element 4 not changed - 4"
-if ![string compare $is64bitonly "no"] then {
+if {![string compare $is64bitonly "no"]} {
print_zero_all
# restore with expressions
@@ -520,7 +520,7 @@ proc test_reload_saved_value { filename msg oldval newval } {
}
# srec format can not be loaded for 64-bit-only platforms
-if ![string compare $is64bitonly "no"] then {
+if {![string compare $is64bitonly "no"]} {
test_reload_saved_value "[set intarr1.srec]" "reload array as value, srec" \
$array_val "\*$array_ptr_type"
test_reload_saved_value "[set intstr1.srec]" "reload struct as value, srec" \
@@ -532,7 +532,7 @@ if ![string compare $is64bitonly "no"] then {
}
# ihex format can not be loaded for 64-bit-only platforms
-if ![string compare $is64bitonly "no"] then {
+if {![string compare $is64bitonly "no"]} {
test_reload_saved_value "[set intarr1.ihex]" \
"reload array as value, intel hex" \
@@ -549,7 +549,7 @@ if ![string compare $is64bitonly "no"] then {
}
# tekhex format can not be loaded for 64-bit-only platforms
-if ![string compare $is64bitonly "no"] then {
+if {![string compare $is64bitonly "no"]} {
test_reload_saved_value "[set intarr1.tekhex]" \
"reload array as value, tekhex" \
$array_val "\*$array_ptr_type"
diff --git a/gdb/testsuite/gdb.base/duplicate-bp.exp b/gdb/testsuite/gdb.base/duplicate-bp.exp
index 9a51292..39ba3a5 100644
--- a/gdb/testsuite/gdb.base/duplicate-bp.exp
+++ b/gdb/testsuite/gdb.base/duplicate-bp.exp
@@ -26,7 +26,7 @@ proc test_setup { count } {
clean_restart ${binfile}
- if ![runto_main] then {
+ if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/eh_return.exp b/gdb/testsuite/gdb.base/eh_return.exp
index a6dda78..e4781e3 100644
--- a/gdb/testsuite/gdb.base/eh_return.exp
+++ b/gdb/testsuite/gdb.base/eh_return.exp
@@ -19,7 +19,7 @@
standard_testfile
# Set compiler flags.
-if {[istarget "powerpc*"]} then {
+if {[istarget "powerpc*"]} {
# PowerPC generates a Traceback Table, as defined in the PPC64 ABI,
# following each function by default. The Traceback Table information is
# typically interpreted by the disassembler as data represented with
diff --git a/gdb/testsuite/gdb.base/ena-dis-br.exp b/gdb/testsuite/gdb.base/ena-dis-br.exp
index 93ac124..8900f53 100644
--- a/gdb/testsuite/gdb.base/ena-dis-br.exp
+++ b/gdb/testsuite/gdb.base/ena-dis-br.exp
@@ -34,7 +34,7 @@ set bp_location14 [gdb_get_line_number "set breakpoint 14 here" $srcfile2]
set bp_location15 [gdb_get_line_number "set breakpoint 15 here" $srcfile2]
set bp_location17 [gdb_get_line_number "set breakpoint 17 here" $srcfile2]
-if ![runto_main] then {
+if {![runto_main]} {
return
}
@@ -123,7 +123,7 @@ gdb_continue_to_end "no stop at auto-disabled break marker2"
# Verify that we can set a breakpoint to be self-deleting after the
# first time it triggers.
-if ![runto_main] then {
+if {![runto_main]} {
return
}
@@ -154,7 +154,7 @@ gdb_test "info break $bp" \
"\[0-9\]*\[ \t\]+breakpoint\[ \t\]+keep\[ \t\]+n.*" \
"info break marker4"
-if ![runto_main] then {
+if {![runto_main]} {
return
}
@@ -193,7 +193,7 @@ gdb_test "continue" \
# should cause the next N triggers of the bp to be ignored. (This is
# a flavor of enablement/disablement, after all.)
-if ![runto_main] then {
+if {![runto_main]} {
return
}
@@ -254,7 +254,7 @@ gdb_test_multiple "continue" "$test" {
# Verify that we can specify both an ignore count and an auto-delete.
-if ![runto_main] then {
+if {![runto_main]} {
return
}
@@ -286,7 +286,7 @@ gdb_test "continue" \
# Verify that a disabled breakpoint's ignore count isn't updated when
# the bp is encountered.
-if ![runto_main] then {
+if {![runto_main]} {
return
}
@@ -315,7 +315,7 @@ gdb_test "info break $bp" \
# (Also verify that GDB gracefully handles the case where the inferior
# isn't stopped at a breakpoint.)
#
-if ![runto_main] then {
+if {![runto_main]} {
return
}
@@ -343,7 +343,7 @@ gdb_test_multiple "continue 2" "$test" {
# Verify that GDB correctly handles the "enable/disable" command
# with arguments, that include multiple locations.
#
-if ![runto_main] then {
+if {![runto_main]} {
return
}
diff --git a/gdb/testsuite/gdb.base/endianity.exp b/gdb/testsuite/gdb.base/endianity.exp
index a6a87e6..243af1c 100644
--- a/gdb/testsuite/gdb.base/endianity.exp
+++ b/gdb/testsuite/gdb.base/endianity.exp
@@ -25,7 +25,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
}
set bp_location [gdb_get_line_number "START"]
-if ![runto "endianity.c:$bp_location" ] then {
+if {![runto "endianity.c:$bp_location"]} {
return -1
}
diff --git a/gdb/testsuite/gdb.base/enum_cond.exp b/gdb/testsuite/gdb.base/enum_cond.exp
index 0f03f02..bb5d6c2 100644
--- a/gdb/testsuite/gdb.base/enum_cond.exp
+++ b/gdb/testsuite/gdb.base/enum_cond.exp
@@ -27,7 +27,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $opts
clean_restart $testfile
-if ![runto_main] then {
+if {![runto_main]} {
perror "could not run to main"
return
}
diff --git a/gdb/testsuite/gdb.base/eval-skip.exp b/gdb/testsuite/gdb.base/eval-skip.exp
index 659a8b8..fe6f7f0 100644
--- a/gdb/testsuite/gdb.base/eval-skip.exp
+++ b/gdb/testsuite/gdb.base/eval-skip.exp
@@ -42,7 +42,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
clean_restart ${binfile}
-if ![runto_main] then {
+if {![runto_main]} {
perror "couldn't run to breakpoint"
return
}
diff --git a/gdb/testsuite/gdb.base/exe-lock.exp b/gdb/testsuite/gdb.base/exe-lock.exp
index 19b4e1a..1276ec0 100644
--- a/gdb/testsuite/gdb.base/exe-lock.exp
+++ b/gdb/testsuite/gdb.base/exe-lock.exp
@@ -37,7 +37,7 @@ if { ! [file exists $binfile] } {
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
perror "couldn't run to breakpoint"
return
}
diff --git a/gdb/testsuite/gdb.base/exec-invalid-sysroot.exp b/gdb/testsuite/gdb.base/exec-invalid-sysroot.exp
index 7f7599c..dec631b 100644
--- a/gdb/testsuite/gdb.base/exec-invalid-sysroot.exp
+++ b/gdb/testsuite/gdb.base/exec-invalid-sysroot.exp
@@ -50,7 +50,7 @@ proc do_exec_sysroot_test {} {
# Start the program running, and stop at main.
#
- if ![runto_main] then {
+ if {![runto_main]} {
return
}
diff --git a/gdb/testsuite/gdb.base/execl-update-breakpoints.exp b/gdb/testsuite/gdb.base/execl-update-breakpoints.exp
index 2964795..fdea0b4 100644
--- a/gdb/testsuite/gdb.base/execl-update-breakpoints.exp
+++ b/gdb/testsuite/gdb.base/execl-update-breakpoints.exp
@@ -42,7 +42,7 @@ if { [gdb_compile $objfile $exec1 executable {debug text_segment=0x1000000}] !=
# exec2. If it is, then skip the test as unsupported.
clean_restart ${exec1}
-if ![runto_main] then {
+if {![runto_main]} {
return -1
}
@@ -56,7 +56,7 @@ gdb_test_multiple "p/x &main" $test {
}
clean_restart ${exec2}
-if ![runto_main] then {
+if {![runto_main]} {
return -1
}
@@ -88,7 +88,7 @@ proc test { always_inserted } {
gdb_test_no_output "set breakpoint always-inserted $always_inserted"
- if ![runto_main] then {
+ if {![runto_main]} {
return -1
}
diff --git a/gdb/testsuite/gdb.base/exprs.exp b/gdb/testsuite/gdb.base/exprs.exp
index 0605dd6..7b081ec 100644
--- a/gdb/testsuite/gdb.base/exprs.exp
+++ b/gdb/testsuite/gdb.base/exprs.exp
@@ -32,7 +32,7 @@ clean_restart ${binfile}
# 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.base/fileio.exp b/gdb/testsuite/gdb.base/fileio.exp
index e00a1ce..18e429c 100644
--- a/gdb/testsuite/gdb.base/fileio.exp
+++ b/gdb/testsuite/gdb.base/fileio.exp
@@ -55,7 +55,7 @@ gdb_test_no_output "set print sevenbit-strings"
gdb_test_no_output "set print address off"
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.base/finish.exp b/gdb/testsuite/gdb.base/finish.exp
index e60c33b..a0f5ced 100644
--- a/gdb/testsuite/gdb.base/finish.exp
+++ b/gdb/testsuite/gdb.base/finish.exp
@@ -76,7 +76,7 @@ proc finish_void { } {
proc finish_abbreviation { abbrev } {
- if { ! [ runto "int_func" ] } then {
+ if {![runto "int_func"]} {
return -1
}
@@ -102,7 +102,7 @@ proc finish_no_print {} {
proc finish_tests { } {
global gdb_prompt skip_float_test
- if { ! [ runto_main ] } then {
+ if {![runto_main]} {
return -1
}
diff --git a/gdb/testsuite/gdb.base/fixsection.exp b/gdb/testsuite/gdb.base/fixsection.exp
index 5734fca..0872017 100644
--- a/gdb/testsuite/gdb.base/fixsection.exp
+++ b/gdb/testsuite/gdb.base/fixsection.exp
@@ -42,7 +42,7 @@ gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
gdb_load_shlib ${lib_sl}
-if ![runto_main] then {
+if {![runto_main]} {
return 1
}
diff --git a/gdb/testsuite/gdb.base/float.exp b/gdb/testsuite/gdb.base/float.exp
index 7fff2b9..b9c5057 100644
--- a/gdb/testsuite/gdb.base/float.exp
+++ b/gdb/testsuite/gdb.base/float.exp
@@ -29,18 +29,18 @@ if { [prepare_for_testing "failed to prepare" float float.c] } {
# Set it up at a breakpoint so we have its registers.
-if ![runto_main] then {
+if {![runto_main]} {
perror "couldn't run to breakpoint"
return
}
# Test "info float".
-if { [is_aarch64_target] } then {
+if {[is_aarch64_target]} {
gdb_test "info float" "d0.*d1.*d31.*s0.*s1.*s31.*"
-} elseif { [istarget "alpha*-*-*"] } then {
+} elseif {[istarget "alpha*-*-*"]} {
gdb_test "info float" "f0.*"
-} elseif { [is_aarch32_target] } then {
+} elseif {[is_aarch32_target]} {
gdb_test_multiple "info float" "info float" {
-re "Software FPU type.*mask:.*flags:.*$gdb_prompt $" {
pass "info float (FPA)"
@@ -54,11 +54,11 @@ if { [is_aarch64_target] } then {
pass "info float (without FPU)"
}
}
-} elseif { [istarget "i?86-*-*"] || [istarget "x86_64-*-*"] } then {
+} elseif {[istarget "i?86-*-*"] || [istarget "x86_64-*-*"]} {
gdb_test "info float" "R7:.*Status Word:.*Opcode:.*"
-} elseif [istarget "ia64-*-*"] then {
+} elseif {[istarget "ia64-*-*"]} {
gdb_test "info float" "f0.*f1.*f127.*"
-} elseif [istarget "m68k-*-*"] then {
+} elseif {[istarget "m68k-*-*"]} {
gdb_test_multiple "info float" "info_float" {
-re "fp0.*fp1.*fp7.*$gdb_prompt $" {
pass "info float (with FPU)"
@@ -67,7 +67,7 @@ if { [is_aarch64_target] } then {
pass "info float (without FPU)"
}
}
-} elseif [istarget "mips*-*-*"] then {
+} elseif {[istarget "mips*-*-*"]} {
gdb_test_multiple "info float" "info float" {
-re "fpu type: none / unused\r\n$gdb_prompt $" {
pass "info float (without FPU)"
@@ -76,7 +76,7 @@ if { [is_aarch64_target] } then {
pass "info float (with FPU)"
}
}
-} elseif [istarget "nds32*-*-*"] then {
+} elseif {[istarget "nds32*-*-*"]} {
gdb_test_multiple "info float" "info_float" {
-re "fd0.*fd3.*$gdb_prompt $" {
pass "info float (with FPU)"
@@ -85,7 +85,7 @@ if { [is_aarch64_target] } then {
pass "info float (without FPU)"
}
}
-} elseif [istarget "powerpc*-*-*"] then {
+} elseif {[istarget "powerpc*-*-*"]} {
gdb_test_multiple "info float" "info_float" {
-re "f0.*f1.*f31.*fpscr.*$gdb_prompt $" {
pass "info float (with FPU)"
@@ -94,9 +94,9 @@ if { [is_aarch64_target] } then {
pass "info float (without FPU)"
}
}
-} elseif [istarget "s390*-*-*"] then {
+} elseif {[istarget "s390*-*-*"]} {
gdb_test "info float" "fpc.*f0.*f1.*f15.*" "info float"
-} elseif [istarget "sh*-*"] then {
+} elseif {[istarget "sh*-*"]} {
# SH may or may not have an FPU
gdb_test_multiple "info float" "info float" {
-re "fpul.*fr0.*fr1.*fr15.*$gdb_prompt $" {
@@ -106,11 +106,11 @@ if { [is_aarch64_target] } then {
pass "info float (without FPU)"
}
}
-} elseif [istarget "hppa*-*"] then {
+} elseif {[istarget "hppa*-*"]} {
gdb_test "info float" "fr4.*fr4R.*fr31R.*" "info float"
-} elseif [istarget "sparc*-*-*"] then {
+} elseif {[istarget "sparc*-*-*"]} {
gdb_test "info float" "f0.*f1.*f31.*d0.*d30.*" "info float"
-} elseif [istarget "riscv*-*-*"] then {
+} elseif {[istarget "riscv*-*-*"]} {
# RISC-V may or may not have an FPU. Additionally, the order of
# fcsr relative to fflags and frm can change depending on whether
# the fflags and frm registers are implemented as real registers
diff --git a/gdb/testsuite/gdb.base/float128.exp b/gdb/testsuite/gdb.base/float128.exp
index 5e471b3..a4d94d4 100644
--- a/gdb/testsuite/gdb.base/float128.exp
+++ b/gdb/testsuite/gdb.base/float128.exp
@@ -32,7 +32,7 @@ if { [do_compile] != "" && [do_compile {-mfloat128}] != "" } {
clean_restart ${binfile}
-if ![runto_main] then {
+if {![runto_main]} {
perror "couldn't run to breakpoint"
return
}
diff --git a/gdb/testsuite/gdb.base/floatn.exp b/gdb/testsuite/gdb.base/floatn.exp
index 1e4f94a..58be8eb 100644
--- a/gdb/testsuite/gdb.base/floatn.exp
+++ b/gdb/testsuite/gdb.base/floatn.exp
@@ -32,7 +32,7 @@ if { [do_compile] != "" && [do_compile {-mfloat128}] != "" } {
clean_restart ${binfile}
-if ![runto_main] then {
+if {![runto_main]} {
perror "couldn't run to breakpoint"
return
}
diff --git a/gdb/testsuite/gdb.base/foll-exec-mode.exp b/gdb/testsuite/gdb.base/foll-exec-mode.exp
index cb6d975..2370015 100644
--- a/gdb/testsuite/gdb.base/foll-exec-mode.exp
+++ b/gdb/testsuite/gdb.base/foll-exec-mode.exp
@@ -35,7 +35,7 @@ if { [target_info exists gdb_protocol]
# Until "catch exec" is implemented on other targets...
#
-if {![istarget "*-linux*"]} then {
+if {![istarget "*-linux*"]} {
return
}
@@ -68,7 +68,7 @@ proc do_catch_exec_test { } {
# Start the program running, and stop at main.
#
- if ![runto_main] then {
+ if {![runto_main]} {
return
}
@@ -107,7 +107,7 @@ proc do_follow_exec_mode_tests { mode cmd infswitch } {
# Start the program running, and stop at main.
#
- if ![runto_main] then {
+ if {![runto_main]} {
return
}
diff --git a/gdb/testsuite/gdb.base/foll-exec.exp b/gdb/testsuite/gdb.base/foll-exec.exp
index a3d1a87..c66fc78 100644
--- a/gdb/testsuite/gdb.base/foll-exec.exp
+++ b/gdb/testsuite/gdb.base/foll-exec.exp
@@ -18,7 +18,7 @@
# Until "catch exec" is implemented on other targets...
#
-if { ![istarget "*-linux*"] } then {
+if {![istarget "*-linux*"]} {
return
}
@@ -51,7 +51,7 @@ proc do_exec_tests {} {
# Start the program running, and stop at main.
#
- if ![runto_main] then {
+ if {![runto_main]} {
return
}
@@ -77,7 +77,7 @@ proc do_exec_tests {} {
# Start the program running, and stop at main.
#
- if ![runto_main] then {
+ if {![runto_main]} {
return
}
@@ -166,7 +166,7 @@ proc do_exec_tests {} {
# Start the program running, and stop at main.
#
- if ![runto_main] then {
+ if {![runto_main]} {
return
}
@@ -234,7 +234,7 @@ proc do_exec_tests {} {
# Start the program running, and stop at main.
#
- if ![runto_main] then {
+ if {![runto_main]} {
return
}
@@ -301,7 +301,7 @@ proc do_exec_tests {} {
# Start the program running, and stop at main.
#
- if ![runto_main] then {
+ if {![runto_main]} {
return
}
@@ -362,7 +362,7 @@ proc do_exec_tests {} {
# Start the program running, and stop at main.
#
- if ![runto_main] then {
+ if {![runto_main]} {
return
}
diff --git a/gdb/testsuite/gdb.base/foll-vfork.exp b/gdb/testsuite/gdb.base/foll-vfork.exp
index 9627a17..c7711a1 100644
--- a/gdb/testsuite/gdb.base/foll-vfork.exp
+++ b/gdb/testsuite/gdb.base/foll-vfork.exp
@@ -21,7 +21,7 @@
# Until "set follow-fork-mode" and "catch vfork" are implemented on
# other targets...
#
-if {![istarget "*-linux*"]} then {
+if {![istarget "*-linux*"]} {
continue
}
diff --git a/gdb/testsuite/gdb.base/fork-running-state.exp b/gdb/testsuite/gdb.base/fork-running-state.exp
index 961852e..4dab353 100644
--- a/gdb/testsuite/gdb.base/fork-running-state.exp
+++ b/gdb/testsuite/gdb.base/fork-running-state.exp
@@ -35,7 +35,7 @@ proc do_test { detach_on_fork follow_fork non_stop schedule_multiple } {
}
}
- if ![runto_main] then {
+ if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/frame-args.exp b/gdb/testsuite/gdb.base/frame-args.exp
index a067406..adc2a9e 100644
--- a/gdb/testsuite/gdb.base/frame-args.exp
+++ b/gdb/testsuite/gdb.base/frame-args.exp
@@ -21,7 +21,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debu
clean_restart ${binfile}
-if ![runto break_me] then {
+if {![runto break_me]} {
perror "Couldn't run ${testfile}"
return
}
diff --git a/gdb/testsuite/gdb.base/frame-info-consistent.exp b/gdb/testsuite/gdb.base/frame-info-consistent.exp
index 1a8c567..966c350 100644
--- a/gdb/testsuite/gdb.base/frame-info-consistent.exp
+++ b/gdb/testsuite/gdb.base/frame-info-consistent.exp
@@ -97,7 +97,7 @@ proc test {dwarf_unwinder} {
gdb_test_no_output "maint set dwarf unwinder $dwarf_unwinder"
- if ![runto_main] then {
+ if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/frameapply.exp b/gdb/testsuite/gdb.base/frameapply.exp
index 7ea1cb9..ed48e5c 100644
--- a/gdb/testsuite/gdb.base/frameapply.exp
+++ b/gdb/testsuite/gdb.base/frameapply.exp
@@ -24,7 +24,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile}] } {
return -1
}
-if ![runto setup_done] then {
+if {![runto setup_done]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/funcargs.exp b/gdb/testsuite/gdb.base/funcargs.exp
index 483fbd9..e260001 100644
--- a/gdb/testsuite/gdb.base/funcargs.exp
+++ b/gdb/testsuite/gdb.base/funcargs.exp
@@ -49,7 +49,7 @@ proc_with_prefix integral_args {} {
gdb_breakpoint call0e
# Run; should stop at call0a and print actual arguments.
- if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
gdb_run_cmd
gdb_test "" " call0a \\(c=97 'a', s=1, i=2, l=3\\) .*" "run to call0a"
@@ -91,7 +91,7 @@ proc unsigned_integral_args {} {
gdb_breakpoint call1e
# Run; should stop at call1a and print actual arguments.
- if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
gdb_run_cmd
gdb_test "" " call1a \\(uc=98 'b', us=6, ui=7, ul=8\\) .*" "run to call1a"
@@ -137,7 +137,7 @@ proc float_and_integral_args {} {
# Run; should stop at call2a and print actual arguments.
- if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
gdb_run_cmd
set test "run to call2a"
gdb_test_multiple "" $test {
@@ -637,7 +637,7 @@ proc_with_prefix shuffle_round_robin {} {
gdb_run_cmd
gdb_test "" "Breakpoint $decimal, call7a .*" "run to call7a"
- if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
gdb_test_multiple "backtrace 100" "backtrace from call7a" {
-re " call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) .* main \\(.*\\) .*$gdb_prompt $" {
pass "backtrace from call7a"
@@ -652,7 +652,7 @@ proc_with_prefix shuffle_round_robin {} {
gdb_continue call7b
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if {$gcc_compiled} { setup_xfail "rs6000-*-*" }
gdb_test_sequence "backtrace 100" "backtrace from call7b" {
"\[\r\n\]#0 .* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) "
@@ -853,9 +853,9 @@ proc_with_prefix localvars_after_alloca { } {
# Print each arg as a double check to see if we can print
# them here as well as with backtrace.
- if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
gdb_test "print c" " = 97 'a'" "print c after runto localvars_after_alloca"
- if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
gdb_test "print s" " = 1" "print s after runto localvars_after_alloca"
gdb_test "print i" " = 2" "print i after runto localvars_after_alloca"
gdb_test "print l" " = 3" "print l after runto localvars_after_alloca"
@@ -887,14 +887,14 @@ proc_with_prefix call_after_alloca { } {
# Print each arg as a double check to see if we can print
# them here as well as with backtrace.
- if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
gdb_test "print c" " = 97 'a'" "print c in call_after_alloca"
- if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
gdb_test "print s" " = 1" "print s in call_after_alloca"
gdb_test "print i" " = 2" "print i in call_after_alloca"
gdb_test "print l" " = 3" "print l in call_after_alloca"
- if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
gdb_test "backtrace 8" "#0.*call_after_alloca_subr \\(c=97 'a', s=1, i=2, l=3, uc=98 'b', us=11, ui=12, ul=13\\).*#1.*call_after_alloca \\(c=97 'a', s=1, i=2, l=3\\).*#2.*main.*" "backtrace from call_after_alloca_subr"
}
@@ -925,14 +925,14 @@ proc_with_prefix localvars_in_indirect_call { } {
# Print each arg as a double check to see if we can print
# them here as well as with backtrace.
- if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
gdb_test "print c" " = 97 'a'" "print c in localvars_in_indirect_call"
- if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
gdb_test "print s" " = 1" "print s in localvars_in_indirect_call"
gdb_test "print i" " = 2" "print i in localvars_in_indirect_call"
gdb_test "print l" " = 3" "print l in localvars_in_indirect_call"
- if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
gdb_test "backtrace 8" \
"#0.*call0a \\(c=97 'a', s=1, i=2, l=3\\).*#1.*main.*" \
"backtrace in indirectly called function"
@@ -965,7 +965,7 @@ proc_with_prefix localvars_in_indirect_call { } {
}
}
- if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
gdb_test "step" "call0a \\(c=97 'a', s=1, i=2, l=3\\).*" \
"stepping into indirectly called function"
}
diff --git a/gdb/testsuite/gdb.base/gcore-buffer-overflow.exp b/gdb/testsuite/gdb.base/gcore-buffer-overflow.exp
index 609d613..ead21e6 100644
--- a/gdb/testsuite/gdb.base/gcore-buffer-overflow.exp
+++ b/gdb/testsuite/gdb.base/gcore-buffer-overflow.exp
@@ -34,7 +34,7 @@ clean_restart ${binfile}
gdb_test_no_output "set args ${pattern}" \
"set buffer exceeding arguments"
-if { ! [ runto_main ] } then {
+if {![runto_main]} {
return -1
}
diff --git a/gdb/testsuite/gdb.base/gcore.exp b/gdb/testsuite/gdb.base/gcore.exp
index 93d943c..1c836c2 100644
--- a/gdb/testsuite/gdb.base/gcore.exp
+++ b/gdb/testsuite/gdb.base/gcore.exp
@@ -23,7 +23,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
return -1
}
-if { ! [ runto_main ] } then {
+if {![runto_main]} {
return -1
}
@@ -81,21 +81,21 @@ gdb_test_sequence "where" "where in corefile" {
}
set post_corefile_regs [capture_command_output "info registers" ""]
-if ![string compare $pre_corefile_regs $post_corefile_regs] then {
+if {![string compare $pre_corefile_regs $post_corefile_regs]} {
pass "corefile restored general registers"
} else {
fail "corefile restored general registers"
}
set post_corefile_allregs [capture_command_output "info all-reg" ""]
-if ![string compare $pre_corefile_allregs $post_corefile_allregs] then {
+if {![string compare $pre_corefile_allregs $post_corefile_allregs]} {
pass "corefile restored all registers"
} else {
fail "corefile restored all registers"
}
set post_corefile_sysregs [capture_command_output "info reg system" ""]
-if ![string compare $pre_corefile_sysregs $post_corefile_sysregs] then {
+if {![string compare $pre_corefile_sysregs $post_corefile_sysregs]} {
pass "corefile restored system registers"
} else {
fail "corefile restored system registers"
diff --git a/gdb/testsuite/gdb.base/gdb1090.exp b/gdb/testsuite/gdb.base/gdb1090.exp
index 16bc19b..36f5fa0 100644
--- a/gdb/testsuite/gdb.base/gdb1090.exp
+++ b/gdb/testsuite/gdb.base/gdb1090.exp
@@ -28,7 +28,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return 1
}
diff --git a/gdb/testsuite/gdb.base/gdb11530.exp b/gdb/testsuite/gdb.base/gdb11530.exp
index 7f16965..77d61c7 100644
--- a/gdb/testsuite/gdb.base/gdb11530.exp
+++ b/gdb/testsuite/gdb.base/gdb11530.exp
@@ -31,7 +31,7 @@ if { [prepare_for_testing "failed to prepare" $testfile $testfile.c {debug}] } {
}
-if { ![runto_main] } then {
+if {![runto_main]} {
return
}
diff --git a/gdb/testsuite/gdb.base/gdb11531.exp b/gdb/testsuite/gdb.base/gdb11531.exp
index 4520a0d..d27dcfe 100644
--- a/gdb/testsuite/gdb.base/gdb11531.exp
+++ b/gdb/testsuite/gdb.base/gdb11531.exp
@@ -38,7 +38,7 @@ if {$skip_hw_watchpoint_tests_p} {
gdb_test_no_output "set can-use-hw-watchpoints 0" ""
}
-if { ![runto_main] } then {
+if {![runto_main]} {
return
}
diff --git a/gdb/testsuite/gdb.base/gdb1250.exp b/gdb/testsuite/gdb.base/gdb1250.exp
index 06390b1..70e219c 100644
--- a/gdb/testsuite/gdb.base/gdb1250.exp
+++ b/gdb/testsuite/gdb.base/gdb1250.exp
@@ -31,7 +31,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
clean_restart ${binfile}
-if ![runto abort {allow-pending}] then {
+if {![runto abort {allow-pending}]} {
return
}
diff --git a/gdb/testsuite/gdb.base/gdb1555.exp b/gdb/testsuite/gdb.base/gdb1555.exp
index c8c86ed..1d603ab 100644
--- a/gdb/testsuite/gdb.base/gdb1555.exp
+++ b/gdb/testsuite/gdb.base/gdb1555.exp
@@ -39,7 +39,7 @@ if { [gdb_compile_shlib $libsrc $libobj {debug}] != ""
clean_restart ${binfile}
gdb_load_shlib $libobj
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/gdb1821.exp b/gdb/testsuite/gdb.base/gdb1821.exp
index cfa95aa..40dcb0c 100644
--- a/gdb/testsuite/gdb.base/gdb1821.exp
+++ b/gdb/testsuite/gdb.base/gdb1821.exp
@@ -28,7 +28,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
perror "couldn't run to breakpoint"
return
}
diff --git a/gdb/testsuite/gdb.base/gnu-ifunc.exp b/gdb/testsuite/gdb.base/gnu-ifunc.exp
index 3fbf237..715f5be 100644
--- a/gdb/testsuite/gdb.base/gnu-ifunc.exp
+++ b/gdb/testsuite/gdb.base/gnu-ifunc.exp
@@ -105,7 +105,7 @@ proc_with_prefix set-break {resolver_attr resolver_debug final_debug} {
clean_restart $binfile-$suffix
gdb_load_shlib ${lib_so}
- if ![runto_main] then {
+ if {![runto_main]} {
return 1
}
@@ -227,7 +227,7 @@ proc misc_tests {resolver_attr resolver_debug final_debug} {
clean_restart $binfile-$suffix
gdb_load_shlib ${lib_so}
- if ![runto_main] then {
+ if {![runto_main]} {
return 1
}
diff --git a/gdb/testsuite/gdb.base/gnu_vector.exp b/gdb/testsuite/gdb.base/gnu_vector.exp
index 796d9e9..5b6eb7a 100644
--- a/gdb/testsuite/gdb.base/gnu_vector.exp
+++ b/gdb/testsuite/gdb.base/gnu_vector.exp
@@ -105,7 +105,7 @@ gdb_test "ptype (char4) 0x01010101" \
gdb_test "ptype (int2) lla" \
"type = int __attribute__ \\(\\(vector_size\\(2\\)\\)\\)"
-if { ![string compare $endian big] } then {
+if {![string compare $endian big]} {
gdb_test "print (char4) ia" "\\\$$decimal = \\{0, 0, 0, 2\\}"
} else {
gdb_test "print (char4) ia" "\\\$$decimal = \\{2, 0, 0, 0\\}"
diff --git a/gdb/testsuite/gdb.base/gold-gdb-index.exp b/gdb/testsuite/gdb.base/gold-gdb-index.exp
index 6073a64..f9a1d07 100644
--- a/gdb/testsuite/gdb.base/gold-gdb-index.exp
+++ b/gdb/testsuite/gdb.base/gold-gdb-index.exp
@@ -34,7 +34,7 @@ if { [have_index $binfile] != "gdb_index" } {
gdb_test_no_output "set auto-solib-add off"
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/hbreak-in-shr-unsupported.exp b/gdb/testsuite/gdb.base/hbreak-in-shr-unsupported.exp
index a521637..4836e13 100644
--- a/gdb/testsuite/gdb.base/hbreak-in-shr-unsupported.exp
+++ b/gdb/testsuite/gdb.base/hbreak-in-shr-unsupported.exp
@@ -39,7 +39,7 @@ if { [gdb_compile_shlib ${srcdir}/${subdir}/${lib_src} ${lib_so} $lib_opts] != "
clean_restart $binfile
gdb_load_shlib $lib_so
-if ![runto_main] then {
+if {![runto_main]} {
return -1
}
diff --git a/gdb/testsuite/gdb.base/hbreak2.exp b/gdb/testsuite/gdb.base/hbreak2.exp
index aecf613..a5e870a 100644
--- a/gdb/testsuite/gdb.base/hbreak2.exp
+++ b/gdb/testsuite/gdb.base/hbreak2.exp
@@ -25,7 +25,7 @@ if { [prepare_for_testing "failed to prepare" "hbreak2" {break.c break1.c} {debu
set srcfile break.c
set srcfile1 break1.c
-if ![runto_main] then {
+if {![runto_main]} {
return
}
@@ -287,7 +287,7 @@ gdb_test "info break" \
#***********
-if ![runto_main] then {
+if {![runto_main]} {
return
}
@@ -315,7 +315,7 @@ gdb_test "hbreak" "Hardware assisted breakpoint \[0-9\]*.*" \
# Verify that a "silent" breakpoint can be set, and that GDB is indeed
# "silent" about its triggering.
#
-if ![runto_main] then {
+if {![runto_main]} {
return
}
@@ -520,7 +520,7 @@ if { [prepare_for_testing "failed to prepare" "hbreak2o2" {break.c break1.c} {de
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return
}
diff --git a/gdb/testsuite/gdb.base/hook-stop.exp b/gdb/testsuite/gdb.base/hook-stop.exp
index f861709..a4f5ec2 100644
--- a/gdb/testsuite/gdb.base/hook-stop.exp
+++ b/gdb/testsuite/gdb.base/hook-stop.exp
@@ -39,7 +39,7 @@ proc setup {commands} {
clean_restart $binfile
- if ![runto_main] then {
+ if {![runto_main]} {
return -code return
}
diff --git a/gdb/testsuite/gdb.base/huge.exp b/gdb/testsuite/gdb.base/huge.exp
index e827462..9be4f32 100644
--- a/gdb/testsuite/gdb.base/huge.exp
+++ b/gdb/testsuite/gdb.base/huge.exp
@@ -42,7 +42,7 @@ clean_restart ${binfile}
set prev_timeout $timeout
set timeout 30
-if { ! [ runto_main ] } then {
+if {![runto_main]} {
return -1
}
diff --git a/gdb/testsuite/gdb.base/infcall-input.exp b/gdb/testsuite/gdb.base/infcall-input.exp
index a09a28a..a1e98ee 100644
--- a/gdb/testsuite/gdb.base/infcall-input.exp
+++ b/gdb/testsuite/gdb.base/infcall-input.exp
@@ -27,7 +27,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return -1
}
diff --git a/gdb/testsuite/gdb.base/inferior-args.exp b/gdb/testsuite/gdb.base/inferior-args.exp
index 691ce0a..30ce076 100644
--- a/gdb/testsuite/gdb.base/inferior-args.exp
+++ b/gdb/testsuite/gdb.base/inferior-args.exp
@@ -16,7 +16,7 @@
# Test running an inferior with arguments.
# This does not work on boards that don't support inferior arguments.
-if [target_info exists noargs] then {
+if {[target_info exists noargs]} {
verbose "skipping gdb.base/inferior-args.exp because of noargs"
return
}
diff --git a/gdb/testsuite/gdb.base/inferior-died.exp b/gdb/testsuite/gdb.base/inferior-died.exp
index 28ea8df..fc0a722 100644
--- a/gdb/testsuite/gdb.base/inferior-died.exp
+++ b/gdb/testsuite/gdb.base/inferior-died.exp
@@ -16,7 +16,7 @@
# Until "set follow-fork-mode" and "catch fork" are implemented on
# other targets...
#
-if { ![istarget "*-*-linux*"] } then {
+if {![istarget "*-*-linux*"]} {
unsupported "inferior-died.exp"
return
}
diff --git a/gdb/testsuite/gdb.base/info-fun.exp b/gdb/testsuite/gdb.base/info-fun.exp
index e683bc3..f2ebd6f 100644
--- a/gdb/testsuite/gdb.base/info-fun.exp
+++ b/gdb/testsuite/gdb.base/info-fun.exp
@@ -53,7 +53,7 @@ foreach_with_prefix n_flag { 0 1 } {
clean_restart $executable
- if ![runto_main] then {
+ if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/info-locals-unused-static-var.exp b/gdb/testsuite/gdb.base/info-locals-unused-static-var.exp
index 8c4027b..221e416 100644
--- a/gdb/testsuite/gdb.base/info-locals-unused-static-var.exp
+++ b/gdb/testsuite/gdb.base/info-locals-unused-static-var.exp
@@ -32,7 +32,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/info-os.exp b/gdb/testsuite/gdb.base/info-os.exp
index d12f875..f4eb42f 100644
--- a/gdb/testsuite/gdb.base/info-os.exp
+++ b/gdb/testsuite/gdb.base/info-os.exp
@@ -16,13 +16,13 @@
standard_testfile .c
# This test is Linux-only.
-if ![istarget *-*-linux*] then {
+if {![istarget *-*-linux*]} {
unsupported "info-os.exp"
return -1
}
# Support for XML-output is needed to run this test.
-if [gdb_skip_xml_test] then {
+if {[gdb_skip_xml_test]} {
unsupported "info-os.exp"
return -1
}
@@ -32,7 +32,7 @@ if { [prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return -1
}
diff --git a/gdb/testsuite/gdb.base/info-proc.exp b/gdb/testsuite/gdb.base/info-proc.exp
index f90c9c4..179efb4 100644
--- a/gdb/testsuite/gdb.base/info-proc.exp
+++ b/gdb/testsuite/gdb.base/info-proc.exp
@@ -48,7 +48,7 @@ if { ! [use_gdb_stub] } {
gdb_test_no_output "set args $cmdline" "set args"
}
-if { ! [ runto_main ] } then {
+if {![runto_main]} {
return -1
}
diff --git a/gdb/testsuite/gdb.base/info-program.exp b/gdb/testsuite/gdb.base/info-program.exp
index 1dc470b..1496ea5 100644
--- a/gdb/testsuite/gdb.base/info-program.exp
+++ b/gdb/testsuite/gdb.base/info-program.exp
@@ -33,7 +33,7 @@ gdb_test "next" ".*" "step before info program"
gdb_test "info program" "Program stopped at $hex\.\r\nIt stopped after being stepped\.\r\nType \"info stack\" or \"info registers\" for more information\." \
"info program after next"
-if { ![runto_main] } then {
+if {![runto_main]} {
return -1
}
diff --git a/gdb/testsuite/gdb.base/info_qt.exp b/gdb/testsuite/gdb.base/info_qt.exp
index e51d027..ee61c27 100644
--- a/gdb/testsuite/gdb.base/info_qt.exp
+++ b/gdb/testsuite/gdb.base/info_qt.exp
@@ -27,7 +27,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile}] } {
return -1
}
-if ![runto setup_done] then {
+if {![runto setup_done]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/inline-frame-cycle-unwind.exp b/gdb/testsuite/gdb.base/inline-frame-cycle-unwind.exp
index c1273f1..4001bc9 100644
--- a/gdb/testsuite/gdb.base/inline-frame-cycle-unwind.exp
+++ b/gdb/testsuite/gdb.base/inline-frame-cycle-unwind.exp
@@ -58,7 +58,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
# Skip this test if Python scripting is not enabled.
if { [skip_python_tests] } { continue }
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/interp.exp b/gdb/testsuite/gdb.base/interp.exp
index 3db90f6..a42d4ae 100644
--- a/gdb/testsuite/gdb.base/interp.exp
+++ b/gdb/testsuite/gdb.base/interp.exp
@@ -90,7 +90,7 @@ gdb_test "$commands\nend" "" "finish defining hello command"
gdb_test "hello" [string_to_regexp "^done,value=\"23\""]
-if ![runto_main] then {
+if {![runto_main]} {
return -1
}
diff --git a/gdb/testsuite/gdb.base/interrupt.exp b/gdb/testsuite/gdb.base/interrupt.exp
index 26741d5..143116c 100644
--- a/gdb/testsuite/gdb.base/interrupt.exp
+++ b/gdb/testsuite/gdb.base/interrupt.exp
@@ -38,7 +38,7 @@ if {[build_executable $testfile.exp $testfile $srcfile $options] == -1} {
gdb_start
-if ![file exists $binfile] then {
+if {![file exists $binfile]} {
perror "$binfile does not exist."
return 0
} else {
@@ -47,7 +47,7 @@ if ![file exists $binfile] then {
# Hope this is unix :-)
gdb_test "shell stty intr '^C'" ".*" \
"set interrupt character"
- if [runto_main] then {
+ if {[runto_main]} {
global inferior_spawn_id gdb_spawn_id
set msg "process is alive"
diff --git a/gdb/testsuite/gdb.base/jit-reader-exec.exp b/gdb/testsuite/gdb.base/jit-reader-exec.exp
index ad47c5a..6113972 100644
--- a/gdb/testsuite/gdb.base/jit-reader-exec.exp
+++ b/gdb/testsuite/gdb.base/jit-reader-exec.exp
@@ -17,7 +17,7 @@
# inferior that used the JIT API then exec'd a program that did not
# use it.
-if { ![istarget "*-linux*"] } then {
+if {![istarget "*-linux*"]} {
return
}
diff --git a/gdb/testsuite/gdb.base/jump.exp b/gdb/testsuite/gdb.base/jump.exp
index 91fde01..527a1ae 100644
--- a/gdb/testsuite/gdb.base/jump.exp
+++ b/gdb/testsuite/gdb.base/jump.exp
@@ -29,7 +29,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
clean_restart ${binfile}
-if ![runto_main] then {
+if {![runto_main]} {
perror "Couldn't run to main"
return -1
}
diff --git a/gdb/testsuite/gdb.base/label-without-address.exp b/gdb/testsuite/gdb.base/label-without-address.exp
index 9c4a949..e55cf7f 100644
--- a/gdb/testsuite/gdb.base/label-without-address.exp
+++ b/gdb/testsuite/gdb.base/label-without-address.exp
@@ -19,7 +19,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/langs.exp b/gdb/testsuite/gdb.base/langs.exp
index fdc8133..1957927 100644
--- a/gdb/testsuite/gdb.base/langs.exp
+++ b/gdb/testsuite/gdb.base/langs.exp
@@ -49,7 +49,7 @@ set isfixed 0
set foo_func foo__Fi
set do_func langs0__2do
-if [runto csub] then {
+if {[runto csub]} {
if { !$isfixed } { set lang c }
gdb_test "show language" "currently $lang\".*" \
@@ -58,20 +58,20 @@ if [runto csub] then {
gdb_test "bt" "#0.*csub.*#1.*(foo|$foo_func) \\(.*#2.*cppsub_ .*#3.*fsub.*#4.*$do_func \\(.*#5 \[0-9a-fx\]* in main.*" "backtrace"
if { !$isfixed } { set lang c\\+\\+; set ext cxx }
- if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
gdb_test "up" ".* in (foo|$foo_func).* at .*langs2\\.$ext.*return csub \\(.*" \
"up to foo"
gdb_test "show language" "currently $lang.*" \
"show language at foo"
- if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
gdb_test "up" ".* in cppsub_ .* at .*langs2\\.$ext.*return foo \\(.*" \
"up to cppsub_"
gdb_test "show language" "currently $lang.*" \
"show language at cppsub_"
if { !$isfixed } { set lang fortran }
- if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
gdb_test "up" ".* in fsub.* at .*langs1\\.f.*" \
"up to fsub"
gdb_test "show language" "currently $lang.*" \
@@ -100,7 +100,7 @@ gdb_load $binfile
# Try exercising the "minimal" language a bit...
-if [runto csub] then {
+if {[runto csub]} {
gdb_test "set lang minimal" \
"Warning: the current language does not match this frame." \
"set lang to minimal"
@@ -117,7 +117,7 @@ if [runto csub] then {
"set lang back to auto for verbose test"
gdb_test_no_output "set verbose on"
if { !$isfixed } { set lang c\\+\\+; set ext cxx }
- if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
gdb_test "up" \
".* in (foo|$foo_func).* at .*langs2\\.$ext.*return csub \\(.*Current language: auto.*" \
"up to foo when verbose"
diff --git a/gdb/testsuite/gdb.base/large-frame.exp b/gdb/testsuite/gdb.base/large-frame.exp
index b58a43f..94bfd55 100644
--- a/gdb/testsuite/gdb.base/large-frame.exp
+++ b/gdb/testsuite/gdb.base/large-frame.exp
@@ -39,7 +39,7 @@ proc run_test { opt_level } {
return
}
- if { ![runto_main] } then {
+ if {![runto_main]} {
return
}
diff --git a/gdb/testsuite/gdb.base/list-missing-source.exp b/gdb/testsuite/gdb.base/list-missing-source.exp
index 6801ab4..e3b8d14 100644
--- a/gdb/testsuite/gdb.base/list-missing-source.exp
+++ b/gdb/testsuite/gdb.base/list-missing-source.exp
@@ -45,7 +45,7 @@ remote_file host delete $srcfile
# Now start GDB, run to main and try to list the source.
clean_restart ${binfile}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/list.exp b/gdb/testsuite/gdb.base/list.exp
index fe894a0..9cd1daa 100644
--- a/gdb/testsuite/gdb.base/list.exp
+++ b/gdb/testsuite/gdb.base/list.exp
@@ -98,7 +98,7 @@ proc test_listsize {} {
# Try small listsize > 2 that is an even number.
- if [ set_listsize 4 ] then {
+ if {[set_listsize 4]} {
gdb_test "list 1" "1\[ \t\]+#include \"list0.h\".*4\[ \t\]+\{" "list line 1 with listsize 4"
gdb_test "list 2" "1\[ \t\]+#include \"list0.h\".*4\[ \t\]+\{" "list line 2 with listsize 4"
@@ -108,7 +108,7 @@ proc test_listsize {} {
# Try a size larger than the entire file.
- if [ set_listsize 100 ] then {
+ if {[set_listsize 100]} {
gdb_test "list 1" "1\[ \t\]+#include \"list0.h\".*\r\n${last_line_re}" "list line 1 with listsize 100"
gdb_test "list 10" "1\[ \t\]+#include \"list0.h\".*\r\n${last_line_re}" "list line 10 with listsize 100"
@@ -411,7 +411,7 @@ gdb_test_no_output "set width 0"
test_listsize
get_debug_format
-if [ set_listsize 10 ] then {
+if {[set_listsize 10]} {
test_list_include_file
test_list_filename_and_number
test_list_function
@@ -466,7 +466,7 @@ proc test_list {command listsize1 listsize2 linerange1 linerange2} {
global binfile
clean_restart $binfile
- if ![runto_main] then {
+ if {![runto_main]} {
return
}
diff --git a/gdb/testsuite/gdb.base/logical.exp b/gdb/testsuite/gdb.base/logical.exp
index b1d3c75..25eb071 100644
--- a/gdb/testsuite/gdb.base/logical.exp
+++ b/gdb/testsuite/gdb.base/logical.exp
@@ -39,7 +39,7 @@ clean_restart ${binfile}
# 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.base/long-inferior-output.exp b/gdb/testsuite/gdb.base/long-inferior-output.exp
index 784eaf9..e3d1f99 100644
--- a/gdb/testsuite/gdb.base/long-inferior-output.exp
+++ b/gdb/testsuite/gdb.base/long-inferior-output.exp
@@ -39,7 +39,7 @@ if [prepare_for_testing "failed to prepare" $testfile {} {debug}] {
return -1
}
-if { ![runto_main] } then {
+if {![runto_main]} {
return
}
diff --git a/gdb/testsuite/gdb.base/long_long.exp b/gdb/testsuite/gdb.base/long_long.exp
index 9c8dd16..81d006f 100644
--- a/gdb/testsuite/gdb.base/long_long.exp
+++ b/gdb/testsuite/gdb.base/long_long.exp
@@ -34,7 +34,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [con
clean_restart ${binfile}
-if { ![runto known_types] } then {
+if {![runto known_types]} {
return
}
diff --git a/gdb/testsuite/gdb.base/longjmp.exp b/gdb/testsuite/gdb.base/longjmp.exp
index f301cac..bd2fc21 100644
--- a/gdb/testsuite/gdb.base/longjmp.exp
+++ b/gdb/testsuite/gdb.base/longjmp.exp
@@ -27,7 +27,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
clean_restart ${binfile}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/maint-info-sections.exp b/gdb/testsuite/gdb.base/maint-info-sections.exp
index 4c7987e..766a3af 100644
--- a/gdb/testsuite/gdb.base/maint-info-sections.exp
+++ b/gdb/testsuite/gdb.base/maint-info-sections.exp
@@ -25,7 +25,7 @@ if {[prepare_for_testing "failed to prepare" $testfile \
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return -1
}
diff --git a/gdb/testsuite/gdb.base/maint-print-frame-id.exp b/gdb/testsuite/gdb.base/maint-print-frame-id.exp
index 395927a..17190cc 100644
--- a/gdb/testsuite/gdb.base/maint-print-frame-id.exp
+++ b/gdb/testsuite/gdb.base/maint-print-frame-id.exp
@@ -22,7 +22,7 @@ if {[prepare_for_testing "failed to prepare" $testfile \
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return -1
}
diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp
index 16628b4..981c2f6 100644
--- a/gdb/testsuite/gdb.base/maint.exp
+++ b/gdb/testsuite/gdb.base/maint.exp
@@ -113,7 +113,7 @@ gdb_test "mt set per off" ".*" "mt set per off for expand-symtabs"
gdb_load ${binfile}
-if ![runto_main] then {
+if {![runto_main]} {
perror "tests suppressed"
}
diff --git a/gdb/testsuite/gdb.base/max-value-size.exp b/gdb/testsuite/gdb.base/max-value-size.exp
index 94e2ff6..a05cca3 100644
--- a/gdb/testsuite/gdb.base/max-value-size.exp
+++ b/gdb/testsuite/gdb.base/max-value-size.exp
@@ -19,7 +19,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
@@ -46,7 +46,7 @@ proc get_max_value_size {} {
proc do_value_printing { max_value_size test_prefix } {
with_test_prefix ${test_prefix} {
gdb_test "p/d one" " = 0"
- if { $max_value_size != "unlimited" && $max_value_size < 100 } then {
+ if {$max_value_size != "unlimited" && $max_value_size < 100} {
gdb_test "p/d one_hundred" \
"value requires 100 bytes, which is more than max-value-size"
} else {
@@ -59,7 +59,7 @@ proc do_value_printing { max_value_size test_prefix } {
# Install SET_VALUE as the value for max-value-size, then print the
# test values.
proc set_and_check_max_value_size { set_value } {
- if { $set_value == "unlimited" } then {
+ if {$set_value == "unlimited"} {
set check_pattern "unlimited"
} else {
set check_pattern "${set_value} bytes"
diff --git a/gdb/testsuite/gdb.base/memattr.exp b/gdb/testsuite/gdb.base/memattr.exp
index 3420e6c..28ca829 100644
--- a/gdb/testsuite/gdb.base/memattr.exp
+++ b/gdb/testsuite/gdb.base/memattr.exp
@@ -142,7 +142,7 @@ gdb_test_multiple "info mem" "info mem(1)" {
exp_continue
}
-re "$gdb_prompt $" {
- if { $see1 && $see2 && $see3 && $see4 && $see5 } then {
+ if {$see1 && $see2 && $see3 && $see4 && $see5} {
pass "info mem (1)"
} else {
fail "info mem (1)"
@@ -216,7 +216,7 @@ gdb_test_multiple "info mem" "mem 2 and 4 were disabled" {
exp_continue
}
-re "$gdb_prompt $" {
- if { $see1 && $see2 && $see3 && $see4 && $see5 } then {
+ if {$see1 && $see2 && $see3 && $see4 && $see5} {
pass "mem 2 and 4 were disabled"
} else {
fail "mem 2 and 4 were disabled"
@@ -258,7 +258,7 @@ gdb_test_multiple "info mem" "mem 2-4 were enabled" {
exp_continue
}
-re "$gdb_prompt $" {
- if { $see1 && $see2 && $see3 && $see4 && $see5 } then {
+ if {$see1 && $see2 && $see3 && $see4 && $see5} {
pass "mem 2-4 were enabled"
} else {
fail "mem 2-4 were enabled"
@@ -300,7 +300,7 @@ gdb_test_multiple "info mem" "mem 1 to 5 were disabled" {
exp_continue
}
-re "$gdb_prompt $" {
- if { $see1 && $see2 && $see3 && $see4 && $see5 } then {
+ if {$see1 && $see2 && $see3 && $see4 && $see5} {
pass "mem 1 to 5 were disabled"
} else {
fail "mem 1 to 5 were disabled"
@@ -342,7 +342,7 @@ gdb_test_multiple "info mem" "mem 1 to 5 were enabled" {
exp_continue
}
-re "$gdb_prompt $" {
- if { $see1 && $see2 && $see3 && $see4 && $see5 } then {
+ if {$see1 && $see2 && $see3 && $see4 && $see5} {
pass "mem 1 to 5 were enabled"
} else {
fail "mem 1 to 5 were enabled"
@@ -391,7 +391,7 @@ gdb_test_multiple "info mem" "mem 1 was deleted" {
exp_continue
}
-re "$gdb_prompt $" {
- if { !$see1 && $see2 && $see3 && $see4 && $see5 } then {
+ if {!$see1 && $see2 && $see3 && $see4 && $see5} {
pass "mem 1 was deleted"
} else {
fail "mem 1 was deleted"
@@ -432,7 +432,7 @@ gdb_test_multiple "info mem" "mem 2 and 4 were deleted" {
exp_continue
}
-re "$gdb_prompt $" {
- if { !$see1 && !$see2 && $see3 && !$see4 && $see5 } then {
+ if {!$see1 && !$see2 && $see3 && !$see4 && $see5} {
pass "mem 2 and 4 were deleted"
} else {
fail "mem 2 and 4 were deleted"
@@ -474,7 +474,7 @@ gdb_test_multiple "info mem" "mem 2-4 were deleted" {
exp_continue
}
-re "$gdb_prompt $" {
- if { !$see1 && !$see2 && !$see3 && !$see4 && $see5 } then {
+ if {!$see1 && !$see2 && !$see3 && !$see4 && $see5} {
pass "mem 2-4 were deleted"
} else {
fail "mem 2-4 were deleted"
diff --git a/gdb/testsuite/gdb.base/mips_pro.exp b/gdb/testsuite/gdb.base/mips_pro.exp
index fe5eb94..4518616 100644
--- a/gdb/testsuite/gdb.base/mips_pro.exp
+++ b/gdb/testsuite/gdb.base/mips_pro.exp
@@ -19,7 +19,7 @@ standard_testfile
# This test must be compiled with -O2 if using gcc.
set options debug
-if { [test_compiler_info gcc-*-*] } then {
+if {[test_compiler_info gcc-*-*]} {
lappend options additional_flags=-O2 additional_flags=-fno-inline
}
@@ -27,11 +27,11 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile $options]} {
return -1
}
-if [runto middle] then {
+if {[runto middle]} {
# PR 3016
# warning: Hit heuristic-fence-post without finding
# warning: enclosing function for pc 0x1006ead0
- if { [test_compiler_info gcc-*-*] } then {
+ if {[test_compiler_info gcc-*-*]} {
setup_xfail "mips64*-*-elf"
}
# The call chain is main -> top -> middle. But gcc can optimize a tail
diff --git a/gdb/testsuite/gdb.base/miscexprs.exp b/gdb/testsuite/gdb.base/miscexprs.exp
index 7d9542f..1cf1217 100644
--- a/gdb/testsuite/gdb.base/miscexprs.exp
+++ b/gdb/testsuite/gdb.base/miscexprs.exp
@@ -50,7 +50,7 @@ clean_restart ${binfile}
#
# 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.base/multi-forks.exp b/gdb/testsuite/gdb.base/multi-forks.exp
index 0e35fbb..14ff95c 100644
--- a/gdb/testsuite/gdb.base/multi-forks.exp
+++ b/gdb/testsuite/gdb.base/multi-forks.exp
@@ -16,7 +16,7 @@
# Until "set follow-fork-mode" and "catch fork" are implemented on
# other targets...
#
-if { ![istarget "*-*-linux*"] } then {
+if {![istarget "*-*-linux*"]} {
return
}
diff --git a/gdb/testsuite/gdb.base/nodebug.exp b/gdb/testsuite/gdb.base/nodebug.exp
index 906dc7e..8eca167 100644
--- a/gdb/testsuite/gdb.base/nodebug.exp
+++ b/gdb/testsuite/gdb.base/nodebug.exp
@@ -84,7 +84,7 @@ proc test_call_promotion {} {
gdb_test "p /d ((uint8 (*) ()) add8_noproto)((uint8) 2, (uint8) 3)" " = 5"
}
-if [nodebug_runto inner] then {
+if {[nodebug_runto inner]} {
# Expect to find global/local symbols in each of text/data/bss.
@@ -292,7 +292,7 @@ if [nodebug_runto inner] then {
# Now, try that we can give names of file-local symbols which happen
# to be unique, and have it still work
- if [nodebug_runto middle] then {
+ if {[nodebug_runto middle]} {
gdb_test "backtrace 10" "#0.*middle.*#1.*top.*#2.*main.*" \
"backtrace from middle"
}
diff --git a/gdb/testsuite/gdb.base/non-lazy-array-index.exp b/gdb/testsuite/gdb.base/non-lazy-array-index.exp
index 66686cf..e35cfd9 100644
--- a/gdb/testsuite/gdb.base/non-lazy-array-index.exp
+++ b/gdb/testsuite/gdb.base/non-lazy-array-index.exp
@@ -22,7 +22,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} {
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return -1
}
diff --git a/gdb/testsuite/gdb.base/noreturn-finish.exp b/gdb/testsuite/gdb.base/noreturn-finish.exp
index b4e358e..140fb91 100644
--- a/gdb/testsuite/gdb.base/noreturn-finish.exp
+++ b/gdb/testsuite/gdb.base/noreturn-finish.exp
@@ -22,7 +22,7 @@ if [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug}] {
proc noreturn_finish_test { } {
global gdb_prompt
- if { ! [ runto_main ] } then {
+ if {![runto_main]} {
return -1
}
diff --git a/gdb/testsuite/gdb.base/noreturn-return.exp b/gdb/testsuite/gdb.base/noreturn-return.exp
index 2560908..6db7023 100644
--- a/gdb/testsuite/gdb.base/noreturn-return.exp
+++ b/gdb/testsuite/gdb.base/noreturn-return.exp
@@ -22,7 +22,7 @@ if [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug}] {
proc noreturn_test { } {
global gdb_prompt
- if { ! [ runto_main ] } then {
+ if {![runto_main]} {
return -1
}
diff --git a/gdb/testsuite/gdb.base/opaque.exp b/gdb/testsuite/gdb.base/opaque.exp
index 4d7a325..4d3f11b 100644
--- a/gdb/testsuite/gdb.base/opaque.exp
+++ b/gdb/testsuite/gdb.base/opaque.exp
@@ -51,7 +51,7 @@ proc setup_xfail_on_opaque_pointer {} {
global gcc_compiled
setup_xfail "vax-*-*" "i*86-sequent-bsd*"
- if {!$gcc_compiled} then {
+ if {!$gcc_compiled} {
setup_xfail "alpha-*-*"
}
}
@@ -59,7 +59,7 @@ proc setup_xfail_on_opaque_pointer {} {
# This seems easier than trying to track different versions of xlc; I'm
# not sure there is much rhyme or reason regarding which tests it fails
# and which ones it passes.
-if {[istarget "rs6000-*-aix*"] && !$gcc_compiled} then {
+if {[istarget "rs6000-*-aix*"] && !$gcc_compiled} {
warning "xfails in opaque.exp may not be set up correctly for xlc"
}
@@ -72,7 +72,7 @@ gdb_test "whatis foop" \
# Ensure that we know the form of the structure that foop points to.
setup_xfail_on_opaque_pointer
-if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
gdb_test "ptype foop" \
"type = struct foo \{\[\r\n\]+ int a;\[\r\n\]+ int b;\[\r\n\]+\} \[*\]+" \
"ptype on opaque struct pointer (statically)"
@@ -128,7 +128,7 @@ gdb_test "whatis foop" \
# Ensure that we know the form of the thing foop points to.
setup_xfail_on_opaque_pointer
-if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
gdb_test "ptype foop" \
"type = struct foo \{\[\r\n\]+ int a;\[\r\n\]+ int b;\[\r\n\]+\} \[*\]+" \
"ptype on opaque struct pointer (dynamically) 1"
@@ -147,7 +147,7 @@ gdb_test "ptype afoo" \
# Ensure that we know the form of an explicit struct foo.
-if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
gdb_test "ptype struct foo" \
"type = struct foo \{\[\r\n\]+ int a;\[\r\n\]+ int b;\[\r\n\]+\}" \
"ptype on opaque struct tagname (dynamically) 1"
diff --git a/gdb/testsuite/gdb.base/overlays.exp b/gdb/testsuite/gdb.base/overlays.exp
index e3c94ac..2c74107 100644
--- a/gdb/testsuite/gdb.base/overlays.exp
+++ b/gdb/testsuite/gdb.base/overlays.exp
@@ -22,14 +22,14 @@
set data_overlays 1
-if [istarget "m32r-*-*"] then {
+if {[istarget "m32r-*-*"]} {
set linker_script "${srcdir}/${subdir}/m32r.ld"
} else {
verbose "Skipping overlay test -- not implemented for this target."
return
}
-if [istarget "*-*-linux*"] then {
+if {[istarget "*-*-linux*"]} {
verbose "Skipping overlay test -- Linux doesn't support overlayed programs."
return
}
@@ -54,7 +54,7 @@ gdb_load ${binfile}
# set it up at a breakpoint so we can play with the variable values
#
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
@@ -95,7 +95,7 @@ set bar_lma [get_func_address "bar" "\\*bar\\*" "bar load address"]
set baz_lma [get_func_address "baz" "\\*baz\\*" "baz load address"]
set grbx_lma [get_func_address "grbx" "\\*grbx\\*" "grbx load address"]
-if $data_overlays then {
+if {$data_overlays} {
gdb_test "print \$foox_lma = &foox" \
".* $iptrcast 0x.*" "foox load addr"
gdb_test "print \$barx_lma = &barx" \
@@ -125,7 +125,7 @@ gdb_test "overlay map .ovly3" ""
gdb_test "overlay list" "Section .ovly3, loaded at.*, mapped at.*" "list ovly3"
set grbx_vma [get_func_address "grbx" "grbx" "grbx runtime address"]
-if $data_overlays then {
+if {$data_overlays} {
gdb_test "overlay map .data00" ""
gdb_test "overlay list" "Section .data00, loaded .*, mapped .*" "list data00"
gdb_test "print \$foox_vma = &foox" \
@@ -152,7 +152,7 @@ gdb_test "print $foo_lma != $foo_vma" ".* = 1" "foo's LMA != VMA"
gdb_test "print $bar_lma != $bar_vma" ".* = 1" "bar's LMA != VMA"
gdb_test "print $baz_lma != $baz_vma" ".* = 1" "baz's LMA != VMA"
gdb_test "print $grbx_lma != $grbx_vma" ".* = 1" "grbx's LMA != VMA"
-if $data_overlays then {
+if {$data_overlays} {
gdb_test "print \$foox_lma != \$foox_vma" ".* = 1" "foox's LMA != VMA"
gdb_test "print \$barx_lma != \$barx_vma" ".* = 1" "barx's LMA != VMA"
gdb_test "print \$bazx_lma != \$bazx_vma" ".* = 1" "bazx's LMA != VMA"
@@ -203,7 +203,7 @@ simultaneous_pair .ovly0 .ovly3
simultaneous_pair .ovly1 .ovly2
simultaneous_pair .ovly1 .ovly3
-if $data_overlays then {
+if {$data_overlays} {
simultaneous_pair .data00 .data02
simultaneous_pair .data00 .data03
simultaneous_pair .data01 .data02
diff --git a/gdb/testsuite/gdb.base/paginate-after-ctrl-c-running.exp b/gdb/testsuite/gdb.base/paginate-after-ctrl-c-running.exp
index df466f2..6ab88a1 100644
--- a/gdb/testsuite/gdb.base/paginate-after-ctrl-c-running.exp
+++ b/gdb/testsuite/gdb.base/paginate-after-ctrl-c-running.exp
@@ -36,7 +36,7 @@ proc test_ctrlc_while_target_running_does_not_paginate {} {
with_test_prefix "ctrlc target running" {
clean_restart $binfile
- if ![runto_main] then {
+ if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/paginate-bg-execution.exp b/gdb/testsuite/gdb.base/paginate-bg-execution.exp
index 34d5ceb..3074eea 100644
--- a/gdb/testsuite/gdb.base/paginate-bg-execution.exp
+++ b/gdb/testsuite/gdb.base/paginate-bg-execution.exp
@@ -32,7 +32,7 @@ proc test_bg_execution_pagination_return {} {
with_test_prefix "paginate" {
clean_restart $binfile
- if ![runto_main] then {
+ if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/paginate-inferior-exit.exp b/gdb/testsuite/gdb.base/paginate-inferior-exit.exp
index 63cb98a..eb38daf 100644
--- a/gdb/testsuite/gdb.base/paginate-inferior-exit.exp
+++ b/gdb/testsuite/gdb.base/paginate-inferior-exit.exp
@@ -31,7 +31,7 @@ proc test_paginate_inferior_exited {} {
with_test_prefix "paginate" {
clean_restart $binfile
- if ![runto_main] then {
+ if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/pc-fp.exp b/gdb/testsuite/gdb.base/pc-fp.exp
index b0e7ec9..191c842 100644
--- a/gdb/testsuite/gdb.base/pc-fp.exp
+++ b/gdb/testsuite/gdb.base/pc-fp.exp
@@ -30,7 +30,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug nowarning
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
perror "couldn't run to breakpoint"
return
}
diff --git a/gdb/testsuite/gdb.base/permissions.exp b/gdb/testsuite/gdb.base/permissions.exp
index f13e985..af6c7f4 100644
--- a/gdb/testsuite/gdb.base/permissions.exp
+++ b/gdb/testsuite/gdb.base/permissions.exp
@@ -81,7 +81,7 @@ gdb_test_no_output "set non-stop off"
gdb_load ${binfile}
-if ![runto_main] then {
+if {![runto_main]} {
perror "couldn't run to breakpoint"
return
}
diff --git a/gdb/testsuite/gdb.base/pie-execl.exp b/gdb/testsuite/gdb.base/pie-execl.exp
index f5dce98..85affd3 100644
--- a/gdb/testsuite/gdb.base/pie-execl.exp
+++ b/gdb/testsuite/gdb.base/pie-execl.exp
@@ -25,8 +25,8 @@ if ![istarget *-linux*] {
# In remote mode we cannot use the 'set args' command, and this
# test requires it.
-if { [target_info exists gdb_protocol] } then {
- if { [target_info gdb_protocol] == "remote" } then {
+if {[target_info exists gdb_protocol]} {
+ if {[target_info gdb_protocol] == "remote"} {
return
}
}
diff --git a/gdb/testsuite/gdb.base/pointers.exp b/gdb/testsuite/gdb.base/pointers.exp
index 41981ee..5fb7cf6 100644
--- a/gdb/testsuite/gdb.base/pointers.exp
+++ b/gdb/testsuite/gdb.base/pointers.exp
@@ -39,7 +39,7 @@ clean_restart ${binfile}
# 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.base/pr11022.exp b/gdb/testsuite/gdb.base/pr11022.exp
index 3e16255..56d26cc 100644
--- a/gdb/testsuite/gdb.base/pr11022.exp
+++ b/gdb/testsuite/gdb.base/pr11022.exp
@@ -28,7 +28,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
clean_restart ${binfile}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/premature-dummy-frame-removal.exp b/gdb/testsuite/gdb.base/premature-dummy-frame-removal.exp
index c22dea4..973e46e 100644
--- a/gdb/testsuite/gdb.base/premature-dummy-frame-removal.exp
+++ b/gdb/testsuite/gdb.base/premature-dummy-frame-removal.exp
@@ -40,7 +40,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.base/printcmds.exp b/gdb/testsuite/gdb.base/printcmds.exp
index 60b9de4..13479ab 100644
--- a/gdb/testsuite/gdb.base/printcmds.exp
+++ b/gdb/testsuite/gdb.base/printcmds.exp
@@ -1105,7 +1105,7 @@ gdb_test "p ctable1\[120\]" "120 'x'" "p ctable1\[120\] #1"
gdb_load ${binfile}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/prologue.exp b/gdb/testsuite/gdb.base/prologue.exp
index 8a35452..9d5d40a 100644
--- a/gdb/testsuite/gdb.base/prologue.exp
+++ b/gdb/testsuite/gdb.base/prologue.exp
@@ -25,7 +25,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
clean_restart ${binfile}
-if ![runto_main] then {
+if {![runto_main]} {
perror "couldn't run to breakpoint"
return
}
diff --git a/gdb/testsuite/gdb.base/ptype.exp b/gdb/testsuite/gdb.base/ptype.exp
index 0fee624..be190e2 100644
--- a/gdb/testsuite/gdb.base/ptype.exp
+++ b/gdb/testsuite/gdb.base/ptype.exp
@@ -56,16 +56,16 @@ gdb_test "ptype struct t_struct" "type = struct t_struct \{.*\[\r\n\] (unsign
# Test the equivalence between '.' and '->' for struct member references.
-if [gdb_test "ptype v_struct1.v_float_member" "type = float"]<0 then {
+if {[gdb_test "ptype v_struct1.v_float_member" "type = float"] < 0} {
return -1
}
-if [gdb_test "ptype v_struct1->v_float_member" "type = float"]<0 then {
+if {[gdb_test "ptype v_struct1->v_float_member" "type = float"] < 0} {
return -1
}
-if [gdb_test "ptype v_t_struct_p.v_float_member" "type = float"]<0 then {
+if {[gdb_test "ptype v_t_struct_p.v_float_member" "type = float"] < 0} {
return -1
}
-if [gdb_test "ptype v_t_struct_p->v_float_member" "type = float"]<0 then {
+if {[gdb_test "ptype v_t_struct_p->v_float_member" "type = float"] < 0} {
return -1
}
@@ -346,7 +346,7 @@ gdb_test "ptype v_int" "type = int.*" "ptype int"
#}
#
-if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" "i*86-*-sysv4*" }
+if {!$gcc_compiled} { setup_xfail "rs6000-*-*" "i*86-*-sysv4*" }
gdb_test "ptype t_char_array" "type = (|unsigned )char \\\[0?\\\]"
gdb_test "ptype pv_char_array" "type = (|unsigned )char \\(\\*\\)\\\[0?\\\]"
@@ -584,7 +584,7 @@ gdb_test "ptype foo" "type = char" "ptype foo typedef after second list of charf
# requires a running process. These call malloc, and can take a long
# time to execute over a slow serial link, so increase the timeout.
-if [runto_main] then {
+if {[runto_main]} {
if [target_info exists gdb,cannot_call_functions] {
unsupported "this target can not call functions"
diff --git a/gdb/testsuite/gdb.base/quit-live.exp b/gdb/testsuite/gdb.base/quit-live.exp
index 00e4af1..78fd7b5 100644
--- a/gdb/testsuite/gdb.base/quit-live.exp
+++ b/gdb/testsuite/gdb.base/quit-live.exp
@@ -101,7 +101,7 @@ proc quit_with_live_inferior {appear_how extra_inferior quit_how} {
}
if {$appear_how == "run"} {
- if ![runto_main] then {
+ if {![runto_main]} {
return
}
} elseif {$appear_how == "attach" || $appear_how == "attach-nofile"} {
diff --git a/gdb/testsuite/gdb.base/radix.exp b/gdb/testsuite/gdb.base/radix.exp
index 50191de..1c4cf30 100644
--- a/gdb/testsuite/gdb.base/radix.exp
+++ b/gdb/testsuite/gdb.base/radix.exp
@@ -37,7 +37,7 @@ proc test_input_radix { iradix iradixhex iradixoctal } {
"initialize radix, input radix $iradix"
gdb_test "set input-radix $iradix" \
"Input radix now set to decimal $iradix, hex $iradixhex, octal $iradixoctal."
- if { $iradix == 10 } then {
+ if {$iradix == 10} {
gdb_test "show radix" \
"Input and output radices set to decimal 10, hex a, octal 12." \
"show radix, input radix $iradix"
@@ -110,7 +110,7 @@ proc test_output_radix { oradix oradixhex oradixoctal } {
"initialize radix, output radix $oradix"
gdb_test "set output-radix $oradix" \
"Output radix now set to decimal $oradix, hex $oradixhex, octal $oradixoctal."
- if { $oradix == 10 } then {
+ if {$oradix == 10} {
gdb_test "show radix" \
"Input and output radices set to decimal 10, hex a, octal 12." \
"show radix, output radix $oradix"
diff --git a/gdb/testsuite/gdb.base/readnever.exp b/gdb/testsuite/gdb.base/readnever.exp
index 3dfecdd..f475633 100644
--- a/gdb/testsuite/gdb.base/readnever.exp
+++ b/gdb/testsuite/gdb.base/readnever.exp
@@ -34,7 +34,7 @@ save_vars { GDBFLAGS } {
}
}
-if ![runto_main] then {
+if {![runto_main]} {
perror "couldn't run to breakpoint"
return
}
diff --git a/gdb/testsuite/gdb.base/recurse.exp b/gdb/testsuite/gdb.base/recurse.exp
index 681cdb5..3505f44 100644
--- a/gdb/testsuite/gdb.base/recurse.exp
+++ b/gdb/testsuite/gdb.base/recurse.exp
@@ -38,7 +38,7 @@ proc recurse_tests {} {
gdb_test_no_output "set can-use-hw-watchpoints 0" ""
}
- if [runto recurse] then {
+ if {[runto recurse]} {
# First we need to step over the assignment of b, so it has a known
# value.
gdb_test "next" "if \\(a == 1\\)" "next over b = 0 in first instance"
diff --git a/gdb/testsuite/gdb.base/reggroups.exp b/gdb/testsuite/gdb.base/reggroups.exp
index f3fc7d7..db48705 100644
--- a/gdb/testsuite/gdb.base/reggroups.exp
+++ b/gdb/testsuite/gdb.base/reggroups.exp
@@ -23,7 +23,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/relational.exp b/gdb/testsuite/gdb.base/relational.exp
index 8018505..98f4379 100644
--- a/gdb/testsuite/gdb.base/relational.exp
+++ b/gdb/testsuite/gdb.base/relational.exp
@@ -33,7 +33,7 @@ if { [prepare_for_testing "failed to prepare" relational int-type.c {debug nowar
# 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.base/remote.exp b/gdb/testsuite/gdb.base/remote.exp
index 579dcd4..4c2bc25 100644
--- a/gdb/testsuite/gdb.base/remote.exp
+++ b/gdb/testsuite/gdb.base/remote.exp
@@ -22,7 +22,7 @@ if {[target_info gdb_protocol] != "remote"
standard_testfile .c
set result [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}]
-if {$result != "" } then {
+if {$result != ""} {
untested "failed to compile"
return -1
}
@@ -87,7 +87,7 @@ proc gdb_load_timed {executable class writesize} {
global test gdb_prompt
set test "timed download `[file tail $executable]' - $class, $writesize"
- if {$writesize != ""} then {
+ if {$writesize != ""} {
gdb_test_no_output "set remote memory-write-packet-size $writesize" \
"$test - set packet size"
@@ -121,7 +121,7 @@ proc gdb_load_timed {executable class writesize} {
set load_begin_time [clock clicks]
set result [gdb_load $executable]
set load_end_time [clock clicks]
- if { $result != 0 } then {
+ if {$result != 0} {
fail "$test - loading executable"
return
}
@@ -158,7 +158,7 @@ set sizeof_random_data [get_sizeof "random_data" 48*1024]
#
# Part THREE: Check the upload behavour
#
-if ![runto_main] then {
+if {![runto_main]} {
return
}
@@ -171,7 +171,7 @@ gdb_test "x/8ub random_data" \
gdb_test "x/8ub random_data + 400 - 4" \
"<random_data\\+396>:\[ \t\]+185\[ \t\]+255\[ \t\]+50\[ \t\]+140\[ \t\]+237\[ \t\]+172\[ \t\]+143\[ \t\]+93"
-if {$sizeof_random_data > 16380 } then {
+if {$sizeof_random_data > 16380} {
gdb_test "x/8ub random_data + 16384 - 4" \
"<random_data\\+16380>:\[ \t\]+178\[ \t\]+180\[ \t\]+135\[ \t\]+93\[ \t\]+70\[ \t\]+62\[ \t\]+205\[ \t\]+76"
}
diff --git a/gdb/testsuite/gdb.base/return.exp b/gdb/testsuite/gdb.base/return.exp
index e3e4702..82a18fa 100644
--- a/gdb/testsuite/gdb.base/return.exp
+++ b/gdb/testsuite/gdb.base/return.exp
@@ -25,7 +25,7 @@ proc return_tests { } {
global gdb_prompt skip_float_test
- if { ! [ runto func1 ] } then { return 0 }
+ if {![runto func1]} { return 0 }
gdb_test_multiple "return" "simple return" {
-re "Make .* return now.*y or n. $" {
diff --git a/gdb/testsuite/gdb.base/return2.exp b/gdb/testsuite/gdb.base/return2.exp
index b5eb2da..50c67e5 100644
--- a/gdb/testsuite/gdb.base/return2.exp
+++ b/gdb/testsuite/gdb.base/return2.exp
@@ -81,7 +81,7 @@ proc return_void { } {
proc return2_tests { } {
global gdb_prompt skip_float_test
- if { ! [ runto_main ] } then {
+ if {![runto_main]} {
return -1
}
@@ -90,12 +90,12 @@ proc return2_tests { } {
return_1 "short"
return_1 "int"
return_1 "long"
- if { ! [istarget "m6811-*-*"] && ![istarget "h8300*-*"] } then {
+ if {![istarget "m6811-*-*"] && ![istarget "h8300*-*"]} {
return_1 "long_long"
}
if {!$skip_float_test} {
return_1 "float"
- if { ! [istarget "m6811-*-*"] } then {
+ if {![istarget "m6811-*-*"]} {
return_1 "double"
}
}
diff --git a/gdb/testsuite/gdb.base/savedregs.exp b/gdb/testsuite/gdb.base/savedregs.exp
index 8cd7138..b092cb9 100644
--- a/gdb/testsuite/gdb.base/savedregs.exp
+++ b/gdb/testsuite/gdb.base/savedregs.exp
@@ -41,7 +41,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
clean_restart ${binfile}
# Advance to main
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/scope.exp b/gdb/testsuite/gdb.base/scope.exp
index 1854496..e807a1c 100644
--- a/gdb/testsuite/gdb.base/scope.exp
+++ b/gdb/testsuite/gdb.base/scope.exp
@@ -52,40 +52,40 @@ proc_with_prefix test_at_main {} {
# Print scope0.c::filelocal_ro, which is 201
# No clue why the rs6000 fails this test.
- if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
+ if {[test_compiler_info gcc-*-*]} { setup_xfail "rs6000-*-*" }
gdb_test "print filelocal_ro" "\\\$$decimal = 201" "print filelocal_ro in test_at_main"
- if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
+ if {[test_compiler_info gcc-*-*]} { setup_xfail "rs6000-*-*" }
gdb_test "print 'scope0.c'::filelocal_ro" "\\\$$decimal = 201" "print 'scope0.c'::filelocal_ro"
# Print scope1.c::filelocal, which is 2
- if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
+ if {[test_compiler_info gcc-*-*]} { setup_xfail "rs6000-*-*" }
gdb_test "print 'scope1.c'::filelocal" "\\\$$decimal = 2" "print 'scope1.c'::filelocal"
# Print scope1.c::filelocal_bss, which is 102
- if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
+ if {[test_compiler_info gcc-*-*]} { setup_xfail "rs6000-*-*" }
gdb_test "print 'scope1.c'::filelocal_bss" "\\\$$decimal = 102" "print 'scope1.c'::filelocal_bss"
# Print scope1.c::filelocal_ro, which is 202
- if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
+ if {[test_compiler_info gcc-*-*]} { setup_xfail "rs6000-*-*" }
gdb_test "print 'scope1.c'::filelocal_ro" "\\\$$decimal = 202" "print 'scope1.c'::filelocal_ro"
# Print scope1.c::foo::funclocal, which is 3
gdb_test "print foo::funclocal" "\\\$$decimal = 3"
- if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
+ if {[test_compiler_info gcc-*-*]} { setup_xfail "rs6000-*-*" }
gdb_test "print 'scope1.c'::foo::funclocal" "\\\$$decimal = 3" "print 'scope1.c'::foo::funclocal"
# Print scope1.c::foo::funclocal_ro, which is 203
gdb_test "print foo::funclocal_ro" "\\\$$decimal = 203"
- if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
+ if {[test_compiler_info gcc-*-*]} { setup_xfail "rs6000-*-*" }
gdb_test "print 'scope1.c'::foo::funclocal_ro" "\\\$$decimal = 203" "print 'scope1.c'::foo::funclocal_ro"
# Print scope1.c::bar::funclocal, which is 4
gdb_test "print bar::funclocal" "\\\$$decimal = 4"
- if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
+ if {[test_compiler_info gcc-*-*]} { setup_xfail "rs6000-*-*" }
gdb_test "print 'scope1.c'::bar::funclocal" "\\\$$decimal = 4" "print 'scope1.c'::bar::funclocal"
}
@@ -105,27 +105,27 @@ proc_with_prefix test_at_foo {} {
gdb_test "print 'scope0.c'::filelocal_bss" "\\\$$decimal = 101" "print 'scope0.c'::filelocal_bss in test_at_foo"
# Print scope0.c::filelocal_ro, which is 201
- if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
+ if {[test_compiler_info gcc-*-*]} { setup_xfail "rs6000-*-*" }
gdb_test "print 'scope0.c'::filelocal_ro" "\\\$$decimal = 201" "print 'scope0.c'::filelocal_ro"
# Print scope1.c::filelocal, which is 2
gdb_test "print filelocal" "\\\$$decimal = 2" "print filelocal at foo"
- if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
+ if {[test_compiler_info gcc-*-*]} { setup_xfail "rs6000-*-*" }
gdb_test "print 'scope1.c'::filelocal" "\\\$$decimal = 2" "print 'scope1.c'::filelocal at foo"
gdb_test "print filelocal_bss" "\\\$$decimal = 102" \
"print filelocal_bss at foo"
- if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
+ if {[test_compiler_info gcc-*-*]} { setup_xfail "rs6000-*-*" }
gdb_test "print 'scope1.c'::filelocal_bss" "\\\$$decimal = 102" "print 'scope1.c'::filelocal_bss at foo"
gdb_test "print filelocal_ro" "\\\$$decimal = 202" \
"print filelocal_ro at foo"
- if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
+ if {[test_compiler_info gcc-*-*]} { setup_xfail "rs6000-*-*" }
gdb_test "print 'scope1.c'::filelocal_ro" "\\\$$decimal = 202" "print 'scope1.c'::filelocal_ro at foo"
@@ -136,7 +136,7 @@ proc_with_prefix test_at_foo {} {
gdb_test "print foo::funclocal" "\\\$$decimal = 3" \
"print foo::funclocal at foo"
- if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
+ if {[test_compiler_info gcc-*-*]} { setup_xfail "rs6000-*-*" }
gdb_test "print 'scope1.c'::foo::funclocal" "\\\$$decimal = 3" "print 'scope1.c'::foo::funclocal at foo"
@@ -148,7 +148,7 @@ proc_with_prefix test_at_foo {} {
gdb_test "print foo::funclocal_bss" "\\\$$decimal = 103" \
"print foo::funclocal_bss at foo"
- if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
+ if {[test_compiler_info gcc-*-*]} { setup_xfail "rs6000-*-*" }
gdb_test "print 'scope1.c'::foo::funclocal_bss" "\\\$$decimal = 103" "print 'scope1.c'::foo::funclocal_bss at foo"
@@ -160,7 +160,7 @@ proc_with_prefix test_at_foo {} {
gdb_test "print foo::funclocal_ro" "\\\$$decimal = 203" \
"print foo::funclocal_ro at foo"
- if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
+ if {[test_compiler_info gcc-*-*]} { setup_xfail "rs6000-*-*" }
gdb_test "print 'scope1.c'::foo::funclocal_ro" "\\\$$decimal = 203" "print 'scope1.c'::foo::funclocal_ro at foo"
@@ -169,7 +169,7 @@ proc_with_prefix test_at_foo {} {
gdb_test "print bar::funclocal" "\\\$$decimal = 4" \
"print bar::funclocal at foo"
- if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
+ if {[test_compiler_info gcc-*-*]} { setup_xfail "rs6000-*-*" }
gdb_test "print 'scope1.c'::bar::funclocal" "\\\$$decimal = 4" "print 'scope1.c'::bar::funclocal at foo"
}
@@ -190,57 +190,57 @@ proc_with_prefix test_at_bar {} {
gdb_test "print 'scope0.c'::filelocal_bss" "\\\$$decimal = 101" "print 'scope0.c'::filelocal_bss in test_at_bar"
# Print scope0.c::filelocal_ro, which is 201
- if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
+ if {[test_compiler_info gcc-*-*]} { setup_xfail "rs6000-*-*" }
gdb_test "print 'scope0.c'::filelocal_ro" "\\\$$decimal = 201" "print 'scope0.c'::filelocal_ro at bar"
# Print scope1.c::filelocal, which is 2
gdb_test "print filelocal" "\\\$$decimal = 2" "print filelocal at bar"
- if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
+ if {[test_compiler_info gcc-*-*]} { setup_xfail "rs6000-*-*" }
gdb_test "print 'scope1.c'::filelocal" "\\\$$decimal = 2" "print 'scope1.c'::filelocal at bar"
# Print scope1.c::filelocal_bss, which is 102
gdb_test "print filelocal_bss" "\\\$$decimal = 102" "print filelocal_bss at bar"
- if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
+ if {[test_compiler_info gcc-*-*]} { setup_xfail "rs6000-*-*" }
gdb_test "print 'scope1.c'::filelocal_bss" "\\\$$decimal = 102" "print 'scope1.c'::filelocal_bss at bar"
# Print scope1.c::filelocal_ro, which is 202
gdb_test "print filelocal_ro" "\\\$$decimal = 202" "print filelocal_ro in test_at_bar"
- if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
+ if {[test_compiler_info gcc-*-*]} { setup_xfail "rs6000-*-*" }
gdb_test "print 'scope1.c'::filelocal_ro" "\\\$$decimal = 202" "print 'scope1.c'::filelocal_ro at bar"
# Print scope1.c::foo::funclocal, which is 3
gdb_test "print foo::funclocal" "\\\$$decimal = 3" "print foo::funclocal at bar"
- if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
+ if {[test_compiler_info gcc-*-*]} { setup_xfail "rs6000-*-*" }
gdb_test "print 'scope1.c'::foo::funclocal" "\\\$$decimal = 3" "print 'scope1.c'::foo::funclocal at bar"
# Print scope1.c::foo::funclocal_bss, which is 103
gdb_test "print foo::funclocal_bss" "\\\$$decimal = 103" "print foo::funclocal_bss at bar"
- if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
+ if {[test_compiler_info gcc-*-*]} { setup_xfail "rs6000-*-*" }
gdb_test "print 'scope1.c'::foo::funclocal_bss" "\\\$$decimal = 103" "print 'scope1.c'::foo::funclocal_bss at bar"
# Print scope1.c::foo::funclocal_ro, which is 203
gdb_test "print foo::funclocal_ro" "\\\$$decimal = 203" "print foo::funclocal_ro at bar"
- if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
+ if {[test_compiler_info gcc-*-*]} { setup_xfail "rs6000-*-*" }
gdb_test "print 'scope1.c'::foo::funclocal_ro" "\\\$$decimal = 203" "print 'scope1.c'::foo::funclocal_ro at bar"
# Print scope1.c::bar::funclocal, which is 4
gdb_test "print funclocal" "\\\$$decimal = 4" "print funclocal at bar"
gdb_test "print bar::funclocal" "\\\$$decimal = 4" "print bar::funclocal at bar"
- if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
+ if {[test_compiler_info gcc-*-*]} { setup_xfail "rs6000-*-*" }
gdb_test "print 'scope1.c'::bar::funclocal" "\\\$$decimal = 4" "print 'scope1.c'::bar::funclocal at bar"
# Print scope1.c::bar::funclocal_bss, which is 104
gdb_test "print funclocal_bss" "\\\$$decimal = 104" "print funclocal_bss at bar"
gdb_test "print bar::funclocal_bss" "\\\$$decimal = 104" "print bar::funclocal_bss at bar"
- if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
+ if {[test_compiler_info gcc-*-*]} { setup_xfail "rs6000-*-*" }
gdb_test "print 'scope1.c'::bar::funclocal_bss" "\\\$$decimal = 104" "print 'scope1.c'::bar::funclocal_bss at bar"
}
@@ -347,8 +347,8 @@ gdb_test "print 'scope0.c'::filelocal_bss" "= 0" \
gdb_test "print 'scope0.c'::filelocal" "= 1" \
"print 'scope0.c'::filelocal before run"
-if [runto_main] then { test_at_main }
-if [runto foo] then { test_at_foo }
-if [runto bar] then { test_at_bar }
-if [runto localscopes] then { test_at_localscopes }
-if [runto autovars] then { test_at_autovars }
+if {[runto_main]} { test_at_main }
+if {[runto foo]} { test_at_foo }
+if {[runto bar]} { test_at_bar }
+if {[runto localscopes]} { test_at_localscopes }
+if {[runto autovars]} { test_at_autovars }
diff --git a/gdb/testsuite/gdb.base/sect-cmd.exp b/gdb/testsuite/gdb.base/sect-cmd.exp
index 8e778ee..c0e2cd0 100644
--- a/gdb/testsuite/gdb.base/sect-cmd.exp
+++ b/gdb/testsuite/gdb.base/sect-cmd.exp
@@ -22,7 +22,7 @@ if { [prepare_for_testing "failed to prepare" "sect-cmd" \
set srcfile break.c
set srcfile1 break1.c
-if ![runto_main] then {
+if {![runto_main]} {
return
}
diff --git a/gdb/testsuite/gdb.base/sepdebug.exp b/gdb/testsuite/gdb.base/sepdebug.exp
index 20a7f34..75811ff 100644
--- a/gdb/testsuite/gdb.base/sepdebug.exp
+++ b/gdb/testsuite/gdb.base/sepdebug.exp
@@ -62,7 +62,7 @@ remote_exec build "rm -rf [file dirname $new_name]"
remote_exec build "mkdir [file dirname $new_name]"
remote_exec build "ln -s ${binfile}${EXEEXT} $new_name"
clean_restart ${testfile}${EXEEXT}
-if { $gdb_file_cmd_debug_info != "debug" } then {
+if {$gdb_file_cmd_debug_info != "debug"} {
fail "no debug information found."
}
@@ -70,7 +70,7 @@ if { $gdb_file_cmd_debug_info != "debug" } then {
set subdir ${old_subdir}
clean_restart ${testfile}${EXEEXT}
-if { $gdb_file_cmd_debug_info != "debug" } then {
+if {$gdb_file_cmd_debug_info != "debug"} {
fail "no debug information found."
}
@@ -278,7 +278,7 @@ gdb_test "info break" "Num Type.*Disp Enb Address.*What.*\[\r\n\]
# inappropriately. (There are no calls to those system functions
# in this test program.)
#
-if ![runto_main] then {
+if {![runto_main]} {
return
}
@@ -329,7 +329,7 @@ gdb_test "break" \
# Verify that a "silent" breakpoint can be set, and that GDB is indeed
# "silent" about its triggering.
#
-if ![runto_main] then {
+if {![runto_main]} {
return
}
@@ -451,7 +451,7 @@ gdb_test_multiple "finish" "finish from called function" {
# Verify that GDB responds gracefully to a "finish" command with
# arguments.
#
-if ![runto_main] then {
+if {![runto_main]} {
return
}
@@ -669,7 +669,7 @@ if {[build_executable sepdebug.exp sepdebug2 sepdebug2.c debug] != -1
# NT_GNU_BUILD_ID / .note.gnu.build-id test:
set build_id_debug_filename [build_id_debug_filename_get $binfile$EXEEXT]
-if ![string compare $build_id_debug_filename ""] then {
+if {![string compare $build_id_debug_filename ""]} {
unsupported "build-id is not supported by the compiler"
# Spare debug files may confuse testsuite runs in the future.
@@ -678,10 +678,10 @@ if ![string compare $build_id_debug_filename ""] then {
set build_id_debugself_filename [build_id_debug_filename_get $debugfile]
set test "build-id support by binutils"
set xfail 0
- if ![string compare $build_id_debugself_filename ""] then {
+ if {![string compare $build_id_debugself_filename ""]} {
unsupported $test
set xfail 1
- } elseif {[string compare $build_id_debugself_filename $build_id_debug_filename] != 0} then {
+ } elseif {[string compare $build_id_debugself_filename $build_id_debug_filename] != 0} {
fail $test
} else {
pass $test
diff --git a/gdb/testsuite/gdb.base/set-noassign.exp b/gdb/testsuite/gdb.base/set-noassign.exp
index c3f2a0c..f91ca5d 100644
--- a/gdb/testsuite/gdb.base/set-noassign.exp
+++ b/gdb/testsuite/gdb.base/set-noassign.exp
@@ -18,7 +18,7 @@ if { [prepare_for_testing "failed to prepare" "set-noassign" start.c {debug nowa
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/setshow.exp b/gdb/testsuite/gdb.base/setshow.exp
index c90d132..26fad28 100644
--- a/gdb/testsuite/gdb.base/setshow.exp
+++ b/gdb/testsuite/gdb.base/setshow.exp
@@ -31,7 +31,7 @@ proc_with_prefix test_setshow_annotate {} {
# Start with a fresh gdb
clean_restart $::binfile
- if ![runto_main] then {
+ if {![runto_main]} {
return
}
@@ -80,7 +80,7 @@ proc_with_prefix test_setshow_annotate {} {
proc_with_prefix test_setshow_args {} {
clean_restart $::binfile
- if ![runto_main] then {
+ if {![runto_main]} {
return
}
diff --git a/gdb/testsuite/gdb.base/setvar.exp b/gdb/testsuite/gdb.base/setvar.exp
index 3d6c570..673df0a 100644
--- a/gdb/testsuite/gdb.base/setvar.exp
+++ b/gdb/testsuite/gdb.base/setvar.exp
@@ -35,7 +35,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
#
gdb_test_no_output "set print sevenbit-strings"
-if ![runto_main] then {
+if {![runto_main]} {
perror "couldn't run to breakpoint"
return
}
@@ -389,7 +389,7 @@ set timeout $prev_timeout
# Test printing of enumeration bitfields.
# GNU C supports them, some other compilers don't.
-if {[is_c_compiler_gcc]} then {
+if {[is_c_compiler_gcc]} {
gdb_test "print sef.field=sm1" ".*.\[0-9\]* = sm1"
gdb_test "print sef.field" ".*.\[0-9\]* = sm1" "print sef.field (sm1)"
gdb_test "print sef.field=s1" ".*.\[0-9\]* = s1"
diff --git a/gdb/testsuite/gdb.base/shlib-call.exp b/gdb/testsuite/gdb.base/shlib-call.exp
index c692570..5db6b12 100644
--- a/gdb/testsuite/gdb.base/shlib-call.exp
+++ b/gdb/testsuite/gdb.base/shlib-call.exp
@@ -61,7 +61,7 @@ gdb_load_shlib $lib1
gdb_load_shlib $lib2
-if ![runto_main] then {
+if {![runto_main]} {
perror "C function calling tests suppressed"
}
diff --git a/gdb/testsuite/gdb.base/shreloc.exp b/gdb/testsuite/gdb.base/shreloc.exp
index 2503240..ad10d5f 100644
--- a/gdb/testsuite/gdb.base/shreloc.exp
+++ b/gdb/testsuite/gdb.base/shreloc.exp
@@ -72,7 +72,7 @@ gdb_load_shlib $lib1_sl
gdb_load_shlib $lib2_sl
# Load up the shared objects
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/sigall.exp b/gdb/testsuite/gdb.base/sigall.exp
index f2c99c8..923499b 100644
--- a/gdb/testsuite/gdb.base/sigall.exp
+++ b/gdb/testsuite/gdb.base/sigall.exp
@@ -37,7 +37,7 @@ proc test_one_sig {nextsig} {
set need_another_continue 1
set missed_handler 0
- if $this_sig_supported then {
+ if {$this_sig_supported} {
set esig $thissig
if { $thissig == "IO" } {
@@ -45,7 +45,7 @@ proc test_one_sig {nextsig} {
}
# On Linux SPARC64 systems SIGLOST==SIGPWR and gdb identifies
# the raised signal as PWR.
- if { $thissig == "LOST" && [ istarget "sparc64-*-linux*" ] } then {
+ if {$thissig == "LOST" && [istarget "sparc64-*-linux*"]} {
set esig "PWR"
}
@@ -54,7 +54,7 @@ proc test_one_sig {nextsig} {
"get signal $esig"
}
- if $need_another_continue then {
+ if {$need_another_continue} {
if { $thissig == "URG" } {
setup_xfail "i*86-pc-linuxoldld-gnu" "i*86-pc-linuxaout-gnu"
}
@@ -73,7 +73,7 @@ proc test_one_sig {nextsig} {
}
}
- if { $missed_handler == "0" } then {
+ if {$missed_handler == "0"} {
gdb_test_multiple "signal 0" "advance to $nextsig" {
-re "Breakpoint.*gen_$nextsig.*\r\n\[0-9\]+\[ \t\]+kill \\(.*\r\n$gdb_prompt $" {
pass "advance to $nextsig"
diff --git a/gdb/testsuite/gdb.base/sigaltstack.exp b/gdb/testsuite/gdb.base/sigaltstack.exp
index 6bddc07..e0d3513 100644
--- a/gdb/testsuite/gdb.base/sigaltstack.exp
+++ b/gdb/testsuite/gdb.base/sigaltstack.exp
@@ -44,7 +44,7 @@ gdb_test "handle SIGVTALRM print pass nostop"
gdb_test "handle SIGPROF print pass nostop"
# Advance to main
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/sigbpt.exp b/gdb/testsuite/gdb.base/sigbpt.exp
index eb44533..0fa63f1 100644
--- a/gdb/testsuite/gdb.base/sigbpt.exp
+++ b/gdb/testsuite/gdb.base/sigbpt.exp
@@ -44,7 +44,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
# Run to `main' where we begin our tests.
#
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/siginfo-addr.exp b/gdb/testsuite/gdb.base/siginfo-addr.exp
index 961bc54..8d6c641 100644
--- a/gdb/testsuite/gdb.base/siginfo-addr.exp
+++ b/gdb/testsuite/gdb.base/siginfo-addr.exp
@@ -34,7 +34,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
gdb_test "display/i \$pc"
# Advance to main
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/siginfo-obj.exp b/gdb/testsuite/gdb.base/siginfo-obj.exp
index 221f0e9..5efff68 100644
--- a/gdb/testsuite/gdb.base/siginfo-obj.exp
+++ b/gdb/testsuite/gdb.base/siginfo-obj.exp
@@ -39,7 +39,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
}
# Advance to main
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
@@ -99,7 +99,7 @@ with_test_prefix "validate siginfo fields" {
# the changed value.
# Advance to main
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/siginfo-thread.exp b/gdb/testsuite/gdb.base/siginfo-thread.exp
index 8ced509..abd328a 100644
--- a/gdb/testsuite/gdb.base/siginfo-thread.exp
+++ b/gdb/testsuite/gdb.base/siginfo-thread.exp
@@ -36,7 +36,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" \
clean_restart $binfile
# Advance to main
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/siginfo.exp b/gdb/testsuite/gdb.base/siginfo.exp
index 2a1ceb8..075b997 100644
--- a/gdb/testsuite/gdb.base/siginfo.exp
+++ b/gdb/testsuite/gdb.base/siginfo.exp
@@ -38,7 +38,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
gdb_test "display/i \$pc"
# Advance to main
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/signals-state-child.exp b/gdb/testsuite/gdb.base/signals-state-child.exp
index e1d7f3a..53ec5e3 100644
--- a/gdb/testsuite/gdb.base/signals-state-child.exp
+++ b/gdb/testsuite/gdb.base/signals-state-child.exp
@@ -81,7 +81,7 @@ remote_close target
clean_restart $binfile
-if { ! [ runto_main ] } then {
+if {![runto_main]} {
return -1
}
diff --git a/gdb/testsuite/gdb.base/signals.exp b/gdb/testsuite/gdb.base/signals.exp
index 2b3fc1c..9970248 100644
--- a/gdb/testsuite/gdb.base/signals.exp
+++ b/gdb/testsuite/gdb.base/signals.exp
@@ -63,7 +63,7 @@ test_handle_all_print
clean_restart $binfile
-if [runto_main] then {
+if {[runto_main]} {
# Since count is a static variable outside main, runto_main is no
# guarantee that count will be 0 at this point.
diff --git a/gdb/testsuite/gdb.base/signest.exp b/gdb/testsuite/gdb.base/signest.exp
index ccbe770..14302d2 100644
--- a/gdb/testsuite/gdb.base/signest.exp
+++ b/gdb/testsuite/gdb.base/signest.exp
@@ -26,7 +26,7 @@ if [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug}] {
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return -1
}
diff --git a/gdb/testsuite/gdb.base/signull.exp b/gdb/testsuite/gdb.base/signull.exp
index e7ce39d..7a33b61 100644
--- a/gdb/testsuite/gdb.base/signull.exp
+++ b/gdb/testsuite/gdb.base/signull.exp
@@ -46,7 +46,7 @@ clean_restart ${binfile}
# Run to `main' where we begin our tests.
#
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/sigrepeat.exp b/gdb/testsuite/gdb.base/sigrepeat.exp
index ab1ce9b..0bcd46b 100644
--- a/gdb/testsuite/gdb.base/sigrepeat.exp
+++ b/gdb/testsuite/gdb.base/sigrepeat.exp
@@ -36,7 +36,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
clean_restart ${binfile}
# Advance to main
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/sizeof.exp b/gdb/testsuite/gdb.base/sizeof.exp
index 3237c21..7cdbace 100644
--- a/gdb/testsuite/gdb.base/sizeof.exp
+++ b/gdb/testsuite/gdb.base/sizeof.exp
@@ -29,7 +29,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
# 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.base/so-impl-ld.exp b/gdb/testsuite/gdb.base/so-impl-ld.exp
index 3c5d107..1822c03 100644
--- a/gdb/testsuite/gdb.base/so-impl-ld.exp
+++ b/gdb/testsuite/gdb.base/so-impl-ld.exp
@@ -40,7 +40,7 @@ gdb_load_shlib $lib_sl
# This program implicitly loads SOM shared libraries.
#
-if ![runto_main] then {
+if {![runto_main]} {
return
}
diff --git a/gdb/testsuite/gdb.base/solib-disc.exp b/gdb/testsuite/gdb.base/solib-disc.exp
index 8f686ce..2433425 100644
--- a/gdb/testsuite/gdb.base/solib-disc.exp
+++ b/gdb/testsuite/gdb.base/solib-disc.exp
@@ -51,7 +51,7 @@ gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
gdb_load_shlib $libobj
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/solib-display.exp b/gdb/testsuite/gdb.base/solib-display.exp
index 4c4da6a..6da4b8d 100644
--- a/gdb/testsuite/gdb.base/solib-display.exp
+++ b/gdb/testsuite/gdb.base/solib-display.exp
@@ -85,7 +85,7 @@ foreach libsepdebug {NO IN SEP} { with_test_prefix "$libsepdebug" {
clean_restart $executable
- if ![runto_main] then {
+ if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/solib-symbol.exp b/gdb/testsuite/gdb.base/solib-symbol.exp
index 02b2028..ff812a7 100644
--- a/gdb/testsuite/gdb.base/solib-symbol.exp
+++ b/gdb/testsuite/gdb.base/solib-symbol.exp
@@ -49,7 +49,7 @@ gdb_test "br foo2" \
delete_breakpoints
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/source-dir.exp b/gdb/testsuite/gdb.base/source-dir.exp
index fff1c1f..e0aa7b4 100644
--- a/gdb/testsuite/gdb.base/source-dir.exp
+++ b/gdb/testsuite/gdb.base/source-dir.exp
@@ -119,7 +119,7 @@ proc test_truncated_comp_dir {} {
gdb_test "show directories" \
"\r\nSource directories searched: \\\$cdir\[:;\]\\\$cwd"
- if ![runto_main] then {
+ if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/source-execution.exp b/gdb/testsuite/gdb.base/source-execution.exp
index 31aa483..f9c889b 100644
--- a/gdb/testsuite/gdb.base/source-execution.exp
+++ b/gdb/testsuite/gdb.base/source-execution.exp
@@ -23,7 +23,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/sss-bp-on-user-bp.exp b/gdb/testsuite/gdb.base/sss-bp-on-user-bp.exp
index 2e479d6..600dc52 100644
--- a/gdb/testsuite/gdb.base/sss-bp-on-user-bp.exp
+++ b/gdb/testsuite/gdb.base/sss-bp-on-user-bp.exp
@@ -24,7 +24,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/stack-checking.exp b/gdb/testsuite/gdb.base/stack-checking.exp
index 9f85302..ce6d2d0 100644
--- a/gdb/testsuite/gdb.base/stack-checking.exp
+++ b/gdb/testsuite/gdb.base/stack-checking.exp
@@ -23,7 +23,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [con
clean_restart ${binfile}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/stack-protector.exp b/gdb/testsuite/gdb.base/stack-protector.exp
index e63b557..782d12a 100644
--- a/gdb/testsuite/gdb.base/stack-protector.exp
+++ b/gdb/testsuite/gdb.base/stack-protector.exp
@@ -44,7 +44,7 @@ proc simple_func_break_test { protection } {
return -1
}
- if { ![runto_main] } then {
+ if {![runto_main]} {
return -1
}
diff --git a/gdb/testsuite/gdb.base/step-break.exp b/gdb/testsuite/gdb.base/step-break.exp
index 61675e5..a5c96f3 100644
--- a/gdb/testsuite/gdb.base/step-break.exp
+++ b/gdb/testsuite/gdb.base/step-break.exp
@@ -21,7 +21,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/step-line.exp b/gdb/testsuite/gdb.base/step-line.exp
index 807475a..cbd73cf 100644
--- a/gdb/testsuite/gdb.base/step-line.exp
+++ b/gdb/testsuite/gdb.base/step-line.exp
@@ -27,7 +27,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/step-over-syscall.exp b/gdb/testsuite/gdb.base/step-over-syscall.exp
index 530765c..4192fa1 100644
--- a/gdb/testsuite/gdb.base/step-over-syscall.exp
+++ b/gdb/testsuite/gdb.base/step-over-syscall.exp
@@ -115,7 +115,7 @@ proc setup { syscall } {
clean_restart $testfile
- if { ![runto_main] } then {
+ if {![runto_main]} {
return -1
}
@@ -386,7 +386,7 @@ step_over_syscall "clone"
set testfile "step-over-fork"
clean_restart $testfile
-if { ![runto_main] } then {
+if {![runto_main]} {
return -1
}
diff --git a/gdb/testsuite/gdb.base/step-test.exp b/gdb/testsuite/gdb.base/step-test.exp
index e73539b..8dfbe86 100644
--- a/gdb/testsuite/gdb.base/step-test.exp
+++ b/gdb/testsuite/gdb.base/step-test.exp
@@ -26,7 +26,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debu
clean_restart ${binfile}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
@@ -143,7 +143,7 @@ gdb_test_multiple "finish" "$test" {
}
-re ".*(Program received|$inferior_exited_re).*$gdb_prompt $" {
# Oops... We ran to the end of the program... Better reset
- if {![runto_main]} then {
+ if {![runto_main]} {
return 0
}
if {![runto step-test.c:45]} {
diff --git a/gdb/testsuite/gdb.base/store.exp b/gdb/testsuite/gdb.base/store.exp
index 65847c7..6fc22f2 100644
--- a/gdb/testsuite/gdb.base/store.exp
+++ b/gdb/testsuite/gdb.base/store.exp
@@ -26,7 +26,7 @@ if { [prepare_for_testing "failed to prepare" $executable $srcfile] } {
# 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.base/structs.exp b/gdb/testsuite/gdb.base/structs.exp
index 71c07eb..ed10d24 100644
--- a/gdb/testsuite/gdb.base/structs.exp
+++ b/gdb/testsuite/gdb.base/structs.exp
@@ -70,7 +70,7 @@ proc start_structs_test { types } {
gdb_test_no_output "set print elements 300"
# Advance to main
- if { ![runto_main] } then {
+ if {![runto_main]} {
return
}
diff --git a/gdb/testsuite/gdb.base/structs2.exp b/gdb/testsuite/gdb.base/structs2.exp
index eecc19b..eb4a89b 100644
--- a/gdb/testsuite/gdb.base/structs2.exp
+++ b/gdb/testsuite/gdb.base/structs2.exp
@@ -19,7 +19,7 @@ if { [prepare_for_testing "failed to prepare" $binfile $srcfile {debug}] } {
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/sym-file.exp b/gdb/testsuite/gdb.base/sym-file.exp
index 66273f1..c73facb 100644
--- a/gdb/testsuite/gdb.base/sym-file.exp
+++ b/gdb/testsuite/gdb.base/sym-file.exp
@@ -71,7 +71,7 @@ if {[prepare_for_testing "failed to prepare" $binfile "$srcfile $srcfile2" $exe
gdb_load_shlib ${lib_so}
-if ![runto_main] then {
+if {![runto_main]} {
return
}
@@ -82,7 +82,7 @@ gdb_continue_to_breakpoint gdb_add_symbol_file
# 2) Set a pending breakpoint at bar in $srcfile3.
set result [gdb_breakpoint bar allow-pending]
-if {!$result} then {
+if {!$result} {
return
}
@@ -93,7 +93,7 @@ set result [gdb_test "add-symbol-file ${lib_syms} addr" \
"add symbol table from file \".*${lib_basename}\\.so\"\
at.*\\(y or n\\) " \
"y"]
-if {$result != 0} then {
+if {$result != 0} {
return
}
@@ -109,7 +109,7 @@ gdb_continue_to_breakpoint bar ".*${lib_basename}\\.c:$lnum_bar.*"
# 6) Set a breakpoint at foo in $srcfile3.
set result [gdb_breakpoint foo]
-if {!$result} then {
+if {!$result} {
return
}
@@ -121,7 +121,7 @@ gdb_continue_to_breakpoint foo ".*${lib_basename}\\.c:$lnum_foo.*"
# 8) Set a breakpoint at gdb_remove_symbol_file in $srcfile for
# removing the library's symbols.
set result [gdb_breakpoint gdb_remove_symbol_file]
-if {!$result} then {
+if {!$result} {
return
}
@@ -135,7 +135,7 @@ set result [gdb_test "remove-symbol-file -a addr" \
"Remove symbol table from file \".*${lib_basename}\\.so\"\\?\
.*\\(y or n\\) " \
"y"]
-if {$result != 0} then {
+if {$result != 0} {
return
}
diff --git a/gdb/testsuite/gdb.base/symbol-alias.exp b/gdb/testsuite/gdb.base/symbol-alias.exp
index 9cc26bb..ac0aba9 100644
--- a/gdb/testsuite/gdb.base/symbol-alias.exp
+++ b/gdb/testsuite/gdb.base/symbol-alias.exp
@@ -23,7 +23,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} [list $srcfile $srcfil
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return
}
diff --git a/gdb/testsuite/gdb.base/term.exp b/gdb/testsuite/gdb.base/term.exp
index 21a0c1a..e931004 100644
--- a/gdb/testsuite/gdb.base/term.exp
+++ b/gdb/testsuite/gdb.base/term.exp
@@ -25,7 +25,7 @@ gdb_test "info terminal" \
"No saved terminal information.*" \
"test info terminal pre-execution"
-if ![runto break_here] then {
+if {![runto break_here]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/twice.exp b/gdb/testsuite/gdb.base/twice.exp
index c129699..f7671e1 100644
--- a/gdb/testsuite/gdb.base/twice.exp
+++ b/gdb/testsuite/gdb.base/twice.exp
@@ -34,7 +34,7 @@ if { [gdb_compile $local_srcfile "${binfile}" executable $options] != "" } {
clean_restart $binfile
-if [runto_main] then {
+if {[runto_main]} {
# Test that GDB can still detect whether we have line numbers
# even if we're executing code in an include file.
diff --git a/gdb/testsuite/gdb.base/type-opaque.exp b/gdb/testsuite/gdb.base/type-opaque.exp
index 6370c99..35ccfb7 100644
--- a/gdb/testsuite/gdb.base/type-opaque.exp
+++ b/gdb/testsuite/gdb.base/type-opaque.exp
@@ -37,7 +37,7 @@ if { [gdb_compile_shlib $libsrc $libobj {debug}] != ""
clean_restart ${binfile}
gdb_load_shlib ${libobj}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/until.exp b/gdb/testsuite/gdb.base/until.exp
index 40945e3..87ebe39 100644
--- a/gdb/testsuite/gdb.base/until.exp
+++ b/gdb/testsuite/gdb.base/until.exp
@@ -25,7 +25,7 @@ set bp_location19 [gdb_get_line_number "set breakpoint 19 here"]
set bp_location20 [gdb_get_line_number "set breakpoint 20 here"]
set bp_location21 [gdb_get_line_number "set breakpoint 21 here"]
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/unwind-on-each-insn.exp b/gdb/testsuite/gdb.base/unwind-on-each-insn.exp
index d8863ad..58fb126 100644
--- a/gdb/testsuite/gdb.base/unwind-on-each-insn.exp
+++ b/gdb/testsuite/gdb.base/unwind-on-each-insn.exp
@@ -31,7 +31,7 @@ if {[prepare_for_testing_full "failed to prepare" \
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/varargs.exp b/gdb/testsuite/gdb.base/varargs.exp
index 7fa464f..a7807ea 100644
--- a/gdb/testsuite/gdb.base/varargs.exp
+++ b/gdb/testsuite/gdb.base/varargs.exp
@@ -58,7 +58,7 @@ if [gdb_skip_stdio_test "varargs.exp"] {
return
}
-if ![runto test] then {
+if {![runto test]} {
perror "couldn't run to breakpoint"
return
}
diff --git a/gdb/testsuite/gdb.base/volatile.exp b/gdb/testsuite/gdb.base/volatile.exp
index 4c56eb4..7fda226 100644
--- a/gdb/testsuite/gdb.base/volatile.exp
+++ b/gdb/testsuite/gdb.base/volatile.exp
@@ -42,7 +42,7 @@ if { [prepare_for_testing "failed to prepare" volatile constvars.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
}
@@ -52,7 +52,7 @@ get_debug_format
# Many tests xfail with gcc 2 -gstabs+.
proc local_compiler_xfail_check { } {
- if { [test_compiler_info gcc-2-*] } then {
+ if {[test_compiler_info gcc-2-*]} {
if { ![test_debug_format "HP"] \
&& ![test_debug_format "DWARF \[0-9\]"] } then {
setup_xfail "*-*-*"
diff --git a/gdb/testsuite/gdb.base/watch-cond-infcall.exp b/gdb/testsuite/gdb.base/watch-cond-infcall.exp
index 5dc0ebc..026f12b 100644
--- a/gdb/testsuite/gdb.base/watch-cond-infcall.exp
+++ b/gdb/testsuite/gdb.base/watch-cond-infcall.exp
@@ -41,7 +41,7 @@ proc test_watchpoint { hw } {
clean_restart ${testfile}
- if { ![runto_main] } then {
+ if {![runto_main]} {
return
}
diff --git a/gdb/testsuite/gdb.base/watch-cond.exp b/gdb/testsuite/gdb.base/watch-cond.exp
index 18fabfc..379fdc7 100644
--- a/gdb/testsuite/gdb.base/watch-cond.exp
+++ b/gdb/testsuite/gdb.base/watch-cond.exp
@@ -36,7 +36,7 @@ if {$skip_hw_watchpoint_tests_p} {
gdb_test_no_output "set can-use-hw-watchpoints 0" ""
}
-if ![runto_main] then {
+if {![runto_main]} {
return
}
@@ -55,7 +55,7 @@ if {$skip_hw_watchpoint_tests_p} {
gdb_test_no_output "set can-use-hw-watchpoints 0" ""
}
-if ![runto_main] then {
+if {![runto_main]} {
return
}
@@ -74,7 +74,7 @@ if {$skip_hw_watchpoint_tests_p} {
gdb_test_no_output "set can-use-hw-watchpoints 0" ""
}
-if ![runto_main] then {
+if {![runto_main]} {
return
}
diff --git a/gdb/testsuite/gdb.base/watch-non-mem.exp b/gdb/testsuite/gdb.base/watch-non-mem.exp
index 61497f8..02d87ed 100644
--- a/gdb/testsuite/gdb.base/watch-non-mem.exp
+++ b/gdb/testsuite/gdb.base/watch-non-mem.exp
@@ -23,7 +23,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return
}
diff --git a/gdb/testsuite/gdb.base/watch-read.exp b/gdb/testsuite/gdb.base/watch-read.exp
index 4b8c87f..d73bc5c 100644
--- a/gdb/testsuite/gdb.base/watch-read.exp
+++ b/gdb/testsuite/gdb.base/watch-read.exp
@@ -32,7 +32,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1
}
-if { ![runto_main] } then {
+if {![runto_main]} {
return
}
diff --git a/gdb/testsuite/gdb.base/watch-vfork.exp b/gdb/testsuite/gdb.base/watch-vfork.exp
index 0ba5af0..2771e4e 100644
--- a/gdb/testsuite/gdb.base/watch-vfork.exp
+++ b/gdb/testsuite/gdb.base/watch-vfork.exp
@@ -27,7 +27,7 @@ proc test_watchpoint_across_vfork { hw teststr } {
clean_restart ${testfile}
- if { ![runto_main] } then {
+ if {![runto_main]} {
return
}
diff --git a/gdb/testsuite/gdb.base/watch_thread_num.exp b/gdb/testsuite/gdb.base/watch_thread_num.exp
index 7d4f19d..da921a7 100644
--- a/gdb/testsuite/gdb.base/watch_thread_num.exp
+++ b/gdb/testsuite/gdb.base/watch_thread_num.exp
@@ -35,7 +35,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
clean_restart ${binfile}
-if { ![runto_main] } then {
+if {![runto_main]} {
return
}
diff --git a/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp b/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp
index 7ea6a74..431f788 100644
--- a/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp
@@ -38,7 +38,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp b/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp
index 6c445d4..0364591 100644
--- a/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp
@@ -79,7 +79,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1
}
-if { ![runto_main] } then {
+if {![runto_main]} {
return
}
@@ -133,7 +133,7 @@ proc test {always_inserted} {
clean_restart $binfile
- if { ![runto_main] } then {
+ if {![runto_main]} {
return
}
diff --git a/gdb/testsuite/gdb.base/watchpoint.exp b/gdb/testsuite/gdb.base/watchpoint.exp
index a8c9857..7c379cb 100644
--- a/gdb/testsuite/gdb.base/watchpoint.exp
+++ b/gdb/testsuite/gdb.base/watchpoint.exp
@@ -272,7 +272,7 @@ proc test_disabling_watchpoints {} {
proc test_stepping {} {
global gdb_prompt
- if [runto marker1] then {
+ if {[runto marker1]} {
gdb_test "watch ival2" ".*\[Ww\]atchpoint \[0-9\]*: ival2"
# Well, let's not be too mundane. It should be a *bit* of a challenge
@@ -351,7 +351,7 @@ proc test_watchpoint_triggered_in_syscall {} {
set x 0
set y 0
set testname "watch buffer passed to read syscall"
- if [runto marker2] then {
+ if {[runto marker2]} {
gdb_test "watch buf\[0\]" ".*\[Ww\]atchpoint \[0-9\]*: buf\\\[0\\\]"
gdb_test "watch buf\[1\]" ".*\[Ww\]atchpoint \[0-9\]*: buf\\\[1\\\]"
gdb_test "watch buf\[2\]" ".*\[Ww\]atchpoint \[0-9\]*: buf\\\[2\\\]"
@@ -409,7 +409,7 @@ proc test_watchpoint_triggered_in_syscall {} {
}
# Did we find what we were looking for? If not, flunk it.
- if [expr $x==$y] then { pass $testname } else { fail "$testname (only triggered $x watchpoints, expected $y)"}
+ if {[expr $x==$y]} { pass $testname } else { fail "$testname (only triggered $x watchpoints, expected $y)"}
# Continue until we hit the finishing marker function.
# Make sure we hit no more watchpoints.
@@ -431,7 +431,7 @@ proc test_watchpoint_triggered_in_syscall {} {
proc test_complex_watchpoint {} {
global gdb_prompt
- if [runto marker4] then {
+ if {[runto marker4]} {
gdb_test "watch ptr1->val" ".*\[Ww\]atchpoint \[0-9\]*: ptr1->val"
gdb_test "break marker5" ".*Breakpoint.*"
@@ -559,7 +559,7 @@ proc test_watchpoint_and_breakpoint {} {
# This is a test for PR breakpoints/7143, which involves setting a
# watchpoint right after you've reached a breakpoint.
- if [runto func3] then {
+ if {[runto func3]} {
gdb_breakpoint [gdb_get_line_number "second x assignment"]
gdb_continue_to_breakpoint "second x assignment"
gdb_test "watch x" ".*atchpoint \[0-9\]+: x"
@@ -730,7 +730,7 @@ proc test_inaccessible_watchpoint {} {
# This is a test for watchpoints on currently inaccessible (but later
# valid) memory.
- if [runto func4] then {
+ if {[runto func4]} {
# Make sure we only allow memory access errors.
set msg "watchpoint refused to insert on nonexistent struct member"
gdb_test_multiple "watch struct1.nosuchmember" $msg {
@@ -811,7 +811,7 @@ proc test_no_hw_watchpoints {} {
# (This proves rather little on kernels that don't support
# fast watchpoints, but still...)
#
- if ![runto_main] then {
+ if {![runto_main]} {
return
}
@@ -936,7 +936,7 @@ proc do_tests {} {
"disable fast watches, 1"
}
- if [initialize] then {
+ if {[initialize]} {
test_simple_watchpoint
@@ -960,7 +960,7 @@ proc do_tests {} {
# elsewhere.
# On sparc-sun-sunos4.1.3, GDB was running all the way to the marker4
# breakpoint before stopping for the watchpoint. I don't know why.
- if {[istarget "hppa*-*-*"]} then {
+ if {[istarget "hppa*-*-*"]} {
test_watchpoint_triggered_in_syscall
}
diff --git a/gdb/testsuite/gdb.base/wchar.exp b/gdb/testsuite/gdb.base/wchar.exp
index f6dce17..d42a41a 100644
--- a/gdb/testsuite/gdb.base/wchar.exp
+++ b/gdb/testsuite/gdb.base/wchar.exp
@@ -20,7 +20,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
}
set bp_location [gdb_get_line_number "START"]
-if ![runto "wchar.c:$bp_location" ] then {
+if {![runto "wchar.c:$bp_location"]} {
return -1
}
diff --git a/gdb/testsuite/gdb.base/whatis-exp.exp b/gdb/testsuite/gdb.base/whatis-exp.exp
index 655fbb8..132eee7 100644
--- a/gdb/testsuite/gdb.base/whatis-exp.exp
+++ b/gdb/testsuite/gdb.base/whatis-exp.exp
@@ -37,7 +37,7 @@ if { [prepare_for_testing "failed to prepare" whatis-exp int-type.c {debug nowar
# 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.base/whatis-ptype-typedefs.exp b/gdb/testsuite/gdb.base/whatis-ptype-typedefs.exp
index be76183..615b159 100644
--- a/gdb/testsuite/gdb.base/whatis-ptype-typedefs.exp
+++ b/gdb/testsuite/gdb.base/whatis-ptype-typedefs.exp
@@ -48,7 +48,7 @@ proc prepare {lang} {
return 0
}
- if ![runto_main] then {
+ if {![runto_main]} {
return 0
}
@@ -301,7 +301,7 @@ proc run_tests {lang} {
}
foreach_with_prefix lang {"c" "c++"} {
- if { [prepare $lang] } then {
+ if {[prepare $lang]} {
run_tests $lang
}
}
diff --git a/gdb/testsuite/gdb.base/whatis.exp b/gdb/testsuite/gdb.base/whatis.exp
index 5a3ff53..c455c67 100644
--- a/gdb/testsuite/gdb.base/whatis.exp
+++ b/gdb/testsuite/gdb.base/whatis.exp
@@ -100,14 +100,14 @@ proc do_test {dir options} {
setup_xfail_on_long_vs_int
# AIX xlc gets this wrong and unsigned long right. Go figure.
- if {!$gcc_compiled} then {setup_xfail "rs6000-*-aix*"}
+ if {!$gcc_compiled} {setup_xfail "rs6000-*-aix*"}
gdb_test "whatis v_long" \
"type = (long|long int)" \
"whatis long"
setup_xfail_on_long_vs_int
# AIX xlc gets this wrong and unsigned long right. Go figure.
- if {!$gcc_compiled} then {setup_xfail "rs6000-*-aix*"}
+ if {!$gcc_compiled} {setup_xfail "rs6000-*-aix*"}
gdb_test "whatis v_signed_long" \
"type = (signed |)(long|long int)" \
"whatis signed long"
@@ -475,7 +475,7 @@ proc do_test {dir options} {
}
# Sun /bin/cc calls this a function returning double.
- if {!$gcc_compiled} then {setup_xfail "*-sun-sunos4*"}
+ if {!$gcc_compiled} {setup_xfail "*-sun-sunos4*"}
gdb_test "whatis v_float_func" \
"type = float \\($void\\)" \
"whatis float function"