# 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
 }
 
 # 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"
 }
 
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
 
            exp_continue
        }
        -re ".*$gdb_prompt $" {
-           if { !$alias_present } then {
+           if {!$alias_present} {
                pass $test_name
            } else {
                fail $test_name
 
 # 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
 }
 
 
 # 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
 }
 
 
        gdb_start
        gdb_reinitialize_dir $srcdir/$subdir
        gdb_load ${binfile}
-       if { ![runto_main] } then {
+       if {![runto_main]} {
            return
        }
 
 
     return -1
 }
 
-if { ![runto_main] } then {
+if {![runto_main]} {
     return
 }
 
 
 # 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
 }
 
 
 clean_restart ${binfile}
 
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 }
 
 # 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
 }
 
 #
 # 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
 }
 
 
     clean_restart $binfile
 
-    if ![runto setup_done] then {
+    if {![runto setup_done]} {
        return 0
     }
 
 
     global gdb_prompt
     global binfile
 
-    if ![isnative] then {
+    if {![isnative]} {
        unsupported "command attach test"
        return 0
     }
 
 
 # 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
 }
 
 
     }
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 set print_core_line [gdb_get_line_number "ABORT;"]
 
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
 
 
 clean_restart ${binfile}
 
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 }
 
 # 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
 }
 # 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"]
 
     }
 
     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
     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
     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"
     }
 
     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
 
 
     clean_restart $binfile
 
-    if ![runto_main] then {
+    if {![runto_main]} {
        return -1
     }
 
 
     with_test_prefix "$cmd" {
        delete_breakpoints
 
-       if ![runto_main] then {
+       if {![runto_main]} {
            return
        }
 
 
        gdb_reload
        set GDBFLAGS $saved_gdbflags
 
-       if ![runto_main] then {
+       if {![runto_main]} {
            return
        }
 
 
            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"
            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"
                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"
                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"
 proc_with_prefix test_no_break_on_catchpoint {} {
     clean_restart break
 
-    if ![runto_main] then {
+    if {![runto_main]} {
        return
     }
 
 proc_with_prefix test_break_nonexistent_line {} {
     clean_restart break
 
-    if ![runto_main] then {
+    if {![runto_main]} {
        return
     }
 
 proc_with_prefix test_break_default {} {
     clean_restart break
 
-    if ![runto_main] then {
+    if {![runto_main]} {
        return
     }
 
 proc_with_prefix test_break_silent_and_more {} {
     clean_restart break
 
-    if ![runto_main] then {
+    if {![runto_main]} {
        return
     }
 
 proc_with_prefix test_finish_arguments {} {
     clean_restart break
 
-    if ![runto_main] then {
+    if {![runto_main]} {
        return
     }
 
 
 
 # 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
 }
 
 
 
 # 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
 }
 
 
 
     with_test_prefix $bt_cmd {
 
-       if ![runto_main] then {
+       if {![runto_main]} {
            return 0
        }
 
 
 gdb_test_no_output "set width 0"
 
 
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 }
     # 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-*-*"
     }
 
 
 gdb_test_no_output "set width 0"
 
 
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 }
 
     }
 
     # Advance to main
-    if { ![runto_main] } then {
+    if {![runto_main]} {
        return
     }
 
 
 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
 }
 
     # 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
             "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"
             "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"
             "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"
 
     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"
 
 
 # Until "catch fork" is implemented on other targets...
 #
-if { ![istarget "*-*-linux*"] && ![istarget "*-*-openbsd*"] } then {
+if {![istarget "*-*-linux*"] && ![istarget "*-*-openbsd*"]} {
     return
 }
 
 
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return -1
 }
 
 
 }
 
 # Check target supports catch syscall or not.
-if ![runto_main] then {
+if {![runto_main]} {
     return
 }
 
 
     # 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 {} {
 
     # 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
 
 # Until "set follow-fork-mode" and "catch fork" are implemented on
 # other targets...
 #
-if {![istarget "*-*-linux*"]} then {
+if {![istarget "*-*-linux*"]} {
     return
 }
 
 
 # Start with a fresh gdb.
 clean_restart ${binfile}
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
 
 }
 
 # Now get past startup code.
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
 
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
         perror "tests suppressed"
 }
 
 
     return -1
 }
 
-if { ![runto_main] } then {
+if {![runto_main]} {
     return 0
 }
 
 
     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"
 }
 
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
 
 clean_restart ${binfile}
 
 
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 }
 
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
 
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
 
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 }
 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)"
     -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)"
 
 #
 # 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
 }
 # 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 "*-*-*" 
 
 standard_testfile
 
 # This test is Linux-only.
-if ![istarget *-*-linux*] then {
+if {![istarget *-*-linux*]} {
     untested "coredump-filter.exp"
     return -1
 }
 
 
 
 # are we on a target board
-if ![isnative] then {
+if {![isnative]} {
     return
 }
 
 # 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"
 }
 
 
 close
 
-if $verbose>1 then {
+if {$verbose>1} {
     send_user "Spawning $GDB $INTERNAL_GDBFLAGS $GDBFLAGS $binfile -core=$corefile\n"
 }
 
 
 # coremaker2.c for details.
 
 # are we on a target board
-if ![isnative] then {
+if {![isnative]} {
     return
 }
 
 
 clean_restart $binfile
 
-if ![runto_main] then {
+if {![runto_main]} {
     return
 }
 
 
 #
 # 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
 }
 
 
 # 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
 }
 
 # 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"
 
 
 gdb_test "p a" { = \{1, 2\}} "no running process: p a"
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
 
     }
     -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 $" { }
            { 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 $" { }
     -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 $" { }
                        { 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 $" { }
        { 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 $" { }
 
 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
 }
 
 
 
 clean_restart ${binfile}
 
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 }
 
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
    return 0
 }
 
 
 
 # Ok, on to real life
 #
-if ![runto_main] then {
+if {![runto_main]} {
     return
 }
 
 
 load_lib gdbserver-support.exp
 
 # The test relies on "detach/attach".
-if { [use_gdb_stub] } then {
+if {[use_gdb_stub]} {
     return 0
 }
 
 
 
 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"
 # 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"
 }
 
 
 # Run target program until data structs are initialized.
 
-if { ! [ runto checkpoint1 ] } then {
+if {![runto checkpoint1]} {
     untested "couldn't run to checkpoint"
     return -1
 }
     }
 }
 
-if ![string compare $is64bitonly "no"] then {
+if {![string compare $is64bitonly "no"]} {
 
 
   test_restore_saved_value "[set intarr1.srec]" "array as value, srec" \
 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"
 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" \
 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 
 }
 
 # 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" \
 }
 
 # 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" \
 }
 
 # 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"
 
 
     clean_restart ${binfile}
 
-    if ![runto_main] then {
+    if {![runto_main]} {
        return 0
     }
 
 
 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
 
 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
 }
 
 
 # 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
 }
 
     "\[0-9\]*\[ \t\]+breakpoint\[ \t\]+keep\[ \t\]+n.*" \
     "info break marker4"
 
-if ![runto_main] then {
+if {![runto_main]} {
     return
 }
 
 # 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
 }
 
 
 # Verify that we can specify both an ignore count and an auto-delete.
 
-if ![runto_main] then {
+if {![runto_main]} {
     return
 }
 
 # Verify that a disabled breakpoint's ignore count isn't updated when
 # the bp is encountered.
 
-if ![runto_main] then {
+if {![runto_main]} {
     return
 }
 
 # (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
 }
 
 # Verify that GDB correctly handles the "enable/disable" command
 # with arguments, that include multiple locations.
 #
-if ![runto_main] then {
+if {![runto_main]} {
     return
 }
 
 
 }
 
 set bp_location [gdb_get_line_number "START"]
-if ![runto "endianity.c:$bp_location" ] then {
+if {![runto "endianity.c:$bp_location"]} {
   return -1
 }
 
 
 
 clean_restart $testfile
 
-if ![runto_main] then {
+if {![runto_main]} {
     perror "could not run to main"
     return
 }
 
 clean_restart ${binfile}
 
 
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 }
 
     return -1
     }
 
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 }
 
 
     # Start the program running, and stop at main.
     #
-    if ![runto_main] then {
+    if {![runto_main]} {
        return
     }
 
 
 # exec2.  If it is, then skip the test as unsupported.
 
 clean_restart ${exec1}
-if ![runto_main] then {
+if {![runto_main]} {
     return -1
 }
 
 }
 
 clean_restart ${exec2}
-if ![runto_main] then {
+if {![runto_main]} {
     return -1
 }
 
 
     gdb_test_no_output "set breakpoint always-inserted $always_inserted"
 
-    if ![runto_main] then {
+    if {![runto_main]} {
        return -1
     }
 
 
 # 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
 }
 
 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
 }
 
 
 proc finish_abbreviation { abbrev } {
 
-    if { ! [ runto "int_func" ] } then {
+    if {![runto "int_func"]} {
         return -1
     }
 
 proc finish_tests { } {
     global gdb_prompt skip_float_test
 
-    if { ! [ runto_main ] } then {
+    if {![runto_main]} {
        return -1
     }
 
 
 gdb_load ${binfile}
 gdb_load_shlib ${lib_sl}
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 1
 }
 
 
 
 # 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)"
             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)"
             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)"
              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)"
             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)"
             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 $" {
              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
 
 
 clean_restart ${binfile}
 
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 }
 
 
 clean_restart ${binfile}
 
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 }
 
 
 # Until "catch exec" is implemented on other targets...
 #
-if {![istarget "*-linux*"]} then {
+if {![istarget "*-linux*"]} {
      return
 }
 
 
     # Start the program running, and stop at main.
     #
-    if ![runto_main] then {
+    if {![runto_main]} {
        return
     }
 
 
        # Start the program running, and stop at main.
        #
-       if ![runto_main] then {
+       if {![runto_main]} {
            return
        }
 
 
 
 # Until "catch exec" is implemented on other targets...
 #
-if { ![istarget "*-linux*"] } then {
+if {![istarget "*-linux*"]} {
     return
 }
 
 
    # Start the program running, and stop at main.
    #
-   if ![runto_main] then {
+   if {![runto_main]} {
      return
    }
 
 
    # Start the program running, and stop at main.
    #
-   if ![runto_main] then {
+   if {![runto_main]} {
      return
    }
 
 
    # Start the program running, and stop at main.
    #
-   if ![runto_main] then {
+   if {![runto_main]} {
      return
    }
 
 
    # Start the program running, and stop at main.
    #
-   if ![runto_main] then {
+   if {![runto_main]} {
      return
    }
 
 
    # Start the program running, and stop at main.
    #
-   if ![runto_main] then {
+   if {![runto_main]} {
      return
    }
 
 
    # Start the program running, and stop at main.
    #
-   if ![runto_main] then {
+   if {![runto_main]} {
      return
    }
 
 
 # Until "set follow-fork-mode" and "catch vfork" are implemented on
 # other targets...
 #
-if {![istarget "*-linux*"]} then {
+if {![istarget "*-linux*"]} {
     continue
 }
 
 
        }
     }
 
-    if ![runto_main] then {
+    if {![runto_main]} {
        return 0
     }
 
 
 
 clean_restart ${binfile}
 
-if ![runto break_me] then {
+if {![runto break_me]} {
   perror "Couldn't run ${testfile}"
   return
 }
 
 
     gdb_test_no_output "maint set dwarf unwinder $dwarf_unwinder"
 
-    if ![runto_main] then {
+    if {![runto_main]} {
        return 0
     }
 
 
     return -1
 }
 
-if ![runto setup_done] then {
+if {![runto setup_done]} {
     return 0
 }
 
 
     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"
 
     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"
 
 
     # 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 {
     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"
 
     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'\\) "
     # 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"
     # 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"
 }
 
     # 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"
        }
     }
 
-    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"
 }
 
 gdb_test_no_output "set args ${pattern}"       \
     "set buffer exceeding arguments"
 
-if { ! [ runto_main ] } then {
+if {![runto_main]} {
     return -1
 }
 
 
     return -1
 }
 
-if { ! [ runto_main ] } then {
+if {![runto_main]} {
     return -1
 }
 
 }
 
 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"
 
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 1
 }
 
 
 }
 
 
-if { ![runto_main] } then {
+if {![runto_main]} {
     return
 }
 
 
    gdb_test_no_output "set can-use-hw-watchpoints 0" ""
 }
 
-if { ![runto_main] } then {
+if {![runto_main]} {
     return
 }
 
 
 
 clean_restart ${binfile}
 
-if ![runto abort {allow-pending}] then {
+if {![runto abort {allow-pending}]} {
     return
 }
 
 
 clean_restart ${binfile}
 gdb_load_shlib $libobj
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
 
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 } 
 
     clean_restart $binfile-$suffix
     gdb_load_shlib ${lib_so}
 
-    if ![runto_main] then {
+    if {![runto_main]} {
        return 1
     }
 
     clean_restart $binfile-$suffix
     gdb_load_shlib ${lib_so}
 
-    if ![runto_main] then {
+    if {![runto_main]} {
        return 1
     }
 
 
 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\\}"
 
 
 gdb_test_no_output "set auto-solib-add off"
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
 
 clean_restart $binfile
 gdb_load_shlib $lib_so
 
-if ![runto_main] then {
+if {![runto_main]} {
     return -1
 }
 
 
 set srcfile break.c
 set srcfile1 break1.c
 
-if ![runto_main] then {
+if {![runto_main]} {
     return
 }
 
 
 #***********
 
-if ![runto_main] then {
+if {![runto_main]} {
     return
 }
 
 # 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
 }
 
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return
 }
 
 
 
     clean_restart $binfile
 
-    if ![runto_main] then {
+    if {![runto_main]} {
        return -code return
     }
 
 
 set prev_timeout $timeout
 set timeout 30
 
-if { ! [ runto_main ] } then {
+if {![runto_main]} {
     return -1
 }
 
 
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return -1
 }
 
 
 # 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
 }
 
 # 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
 }
 
 
        clean_restart $executable
 
-       if ![runto_main] then {
+       if {![runto_main]} {
            return 0
        }
 
 
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
 
 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
 }
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return -1
 }
 
 
     gdb_test_no_output "set args $cmdline" "set args"
 }
 
-if { ! [ runto_main ] } then {
+if {![runto_main]} {
     return -1
 }
 
 
 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
 }
 
 
     return -1
 }
 
-if ![runto setup_done] then {
+if {![runto setup_done]} {
     return 0
 }
 
 
 # Skip this test if Python scripting is not enabled.
 if { [skip_python_tests] } { continue }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
 
 
 gdb_test "hello" [string_to_regexp "^done,value=\"23\""]
 
-if ![runto_main] then {
+if {![runto_main]} {
   return -1
 }
 
 
 gdb_start
 
 
-if ![file exists $binfile] then {
+if {![file exists $binfile]} {
     perror "$binfile does not exist."
     return 0
 } else {
     # 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"
 
 # inferior that used the JIT API then exec'd a program that did not
 # use it.
 
-if { ![istarget "*-linux*"] } then {
+if {![istarget "*-linux*"]} {
     return
 }
 
 
 
 clean_restart ${binfile}
 
-if ![runto_main] then {
+if {![runto_main]} {
   perror "Couldn't run to main"
   return -1
 }
 
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 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\".*" \
     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.*" \
 
 # 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"
        "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"
 
        return
     }
 
-    if { ![runto_main] } then {
+    if {![runto_main]} {
        return
     }
 
 
 # Now start GDB, run to main and try to list the source.
 clean_restart ${binfile}
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
 
 
     # 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"
        
 
     # 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"
 
 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
        global binfile
 
        clean_restart $binfile
-       if ![runto_main] then {
+       if {![runto_main]} {
            return
        }
 
 
 # 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
 }
 
     return -1
 }
 
-if { ![runto_main] } then {
+if {![runto_main]} {
     return
 }
 
 
 
 clean_restart ${binfile}
 
-if { ![runto known_types] } then { 
+if {![runto known_types]} {
    return 
 }
 
 
 
 clean_restart ${binfile}
 
-if ![runto_main] then {
+if {![runto_main]} {
    return 0
 }
 
 
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return -1
 }
 
 
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return -1
 }
 
 
 
 gdb_load ${binfile}
 
-if ![runto_main] then {
+if {![runto_main]} {
         perror "tests suppressed"
 }
 
 
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
 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 {
 # 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"
 
        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)"
        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"
        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"
        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"
        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"
        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"
        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"
        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"
 
 # 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
 }
 
     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
 
 #
 # 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
 }
 
 # Until "set follow-fork-mode" and "catch fork" are implemented on
 # other targets...
 #
-if { ![istarget "*-*-linux*"] } then {
+if {![istarget "*-*-linux*"]} {
     return
 }
 
 
     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.
     
 
     # 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"
     }
 
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return -1
 }
 
 
 proc noreturn_finish_test { } {
     global gdb_prompt
 
-    if { ! [ runto_main ] } then {
+    if {![runto_main]} {
        return -1
     }
 
 
 proc noreturn_test { } {
     global gdb_prompt
 
-    if { ! [ runto_main ] } then {
+    if {![runto_main]} {
        return -1
     }
 
 
        global gcc_compiled
 
        setup_xfail "vax-*-*" "i*86-sequent-bsd*"
-       if {!$gcc_compiled} then {
+       if {!$gcc_compiled} {
                setup_xfail "alpha-*-*"
        }
 }
 # 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"
 }
 
 # 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)"
 # 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"
 
 # 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"
 
 
 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 
 }
 # set it up at a breakpoint so we can play with the variable values
 #
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
 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" \
 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" \
 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"
 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
 
     with_test_prefix "ctrlc target running" {
        clean_restart $binfile
 
-       if ![runto_main] then {
+       if {![runto_main]} {
            return 0
        }
 
 
     with_test_prefix "paginate" {
        clean_restart $binfile
 
-       if ![runto_main] then {
+       if {![runto_main]} {
            return 0
        }
 
 
     with_test_prefix "paginate" {
        clean_restart $binfile
 
-       if ![runto_main] then {
+       if {![runto_main]} {
            return 0
        }
 
 
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 }
 
 
 gdb_load ${binfile}
 
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 }
 
 
 # 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
     }
 }
 
 # 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
 }
 
 
 clean_restart ${binfile}
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
 
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
 
 
 gdb_load ${binfile}
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
 
 
 clean_restart ${binfile}
 
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 }
 
 
 # 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
 }
 
 #}
 #
 
-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?\\\]"
 # 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"
 
     }
 
     if {$appear_how == "run"} {
-       if ![runto_main] then {
+       if {![runto_main]} {
            return
        }
     } elseif {$appear_how == "attach" || $appear_how == "attach-nofile"} {
 
        "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"
        "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"
 
     }
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 }
 
         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"
 
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
 
 # 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
 }
 
 standard_testfile .c
 
 set result [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}]
-if {$result != "" } then {
+if {$result != ""} {
     untested "failed to compile"
     return -1
 }
     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"
 
     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
     }
 #
 # Part THREE: Check the upload behavour
 #
-if ![runto_main] then {
+if {![runto_main]} {
     return
 }
 
 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"
 }
 
     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. $" {
 
 proc return2_tests { } {
     global gdb_prompt skip_float_test
 
-    if { ! [ runto_main ] } then {
+    if {![runto_main]} {
        return -1
     }
 
     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"
        }
     }
 
 clean_restart ${binfile}
 
 # Advance to main
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
 
     # 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"
 }
 
     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"
 
 
     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"
 
 
     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"
 
 
     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"
 
 
     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"
 
 }
     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"
 }
 
 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 }
 
 set srcfile break.c
 set srcfile1 break1.c
 
-if ![runto_main] then {
+if {![runto_main]} {
     return
 }
 
 
 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."
 }
 
 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."
 }
 
 # inappropriately.  (There are no calls to those system functions
 # in this test program.)
 #
-if ![runto_main] then { 
+if {![runto_main]} {
     return
 }
 
 # 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
 }
 
 # Verify that GDB responds gracefully to a "finish" command with
 # arguments.
 #
-if ![runto_main] then {
+if {![runto_main]} {
     return
 }
 
 # 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.
     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
 
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
 
     # Start with a fresh gdb
     clean_restart $::binfile
 
-    if ![runto_main] then {
+    if {![runto_main]} {
        return
     }
 
 proc_with_prefix test_setshow_args {} {
     clean_restart $::binfile
 
-    if ![runto_main] then {
+    if {![runto_main]} {
        return
     }
 
 
 #
 gdb_test_no_output "set print sevenbit-strings" 
 
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 }
 # 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"
 
 gdb_load_shlib $lib2
 
 
-if ![runto_main] then {
+if {![runto_main]} {
         perror "C function calling tests suppressed"
 }
 
 
 gdb_load_shlib $lib2_sl
 
 # Load up the shared objects
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
 
 
     set need_another_continue 1
     set missed_handler 0
-    if $this_sig_supported then {
+    if {$this_sig_supported} {
        set esig $thissig
 
        if { $thissig == "IO" } {
        }
        # 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"
        }
 
                "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"
        }
        }
     }
 
-    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"
 
 gdb_test "handle SIGPROF print pass nostop"
 
 # Advance to main
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
 
 # Run to `main' where we begin our tests.
 #
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
 
 gdb_test "display/i \$pc"
 
 # Advance to main
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
 
 }
 
 # Advance to main
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
 # the changed value.
 
 # Advance to main
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
 
 clean_restart $binfile
 
 # Advance to main
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
 
 gdb_test "display/i \$pc"
 
 # Advance to main
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
 
 
 clean_restart $binfile
 
-if { ! [ runto_main ] } then {
+if {![runto_main]} {
     return -1
 }
 
 
 
 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.
 
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return -1
 }
 
 
 # Run to `main' where we begin our tests.
 #
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
 
 clean_restart ${binfile}
 
 # Advance to main
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
 
 # 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
 }
 
 
 # This program implicitly loads SOM shared libraries.
 #
-if ![runto_main] then {
+if {![runto_main]} {
     return
 }
 
 
 gdb_load ${binfile}
 gdb_load_shlib $libobj
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
 
 
     clean_restart $executable
 
-    if ![runto_main] then {
+    if {![runto_main]} {
       return 0
     }
 
 
 
 delete_breakpoints
 
-if ![runto_main] then {
+if {![runto_main]} {
   return 0
 }
 
 
     gdb_test "show directories" \
        "\r\nSource directories searched: \\\$cdir\[:;\]\\\$cwd"
 
-    if ![runto_main] then {
+    if {![runto_main]} {
        return 0
     }
 
 
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
 
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
 
 
 clean_restart ${binfile}
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
 
        return -1
     }
 
-    if { ![runto_main] } then {
+    if {![runto_main]} {
        return -1
     }
 
 
      return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
    return 0
 }
 
 
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
    return 0
 }
 
 
 
     clean_restart $testfile
 
-    if { ![runto_main] } then {
+    if {![runto_main]} {
        return -1
     }
 
 
 set testfile "step-over-fork"
 clean_restart $testfile
-if { ![runto_main] } then {
+if {![runto_main]} {
     return -1
 }
 
 
 
 clean_restart ${binfile}
 
-if ![runto_main] then {
+if {![runto_main]} {
    return 0
 }
 
     }
     -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]} {
 
 # 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
 }
 
     gdb_test_no_output "set print elements 300"
 
     # Advance to main
-    if { ![runto_main] } then {
+    if {![runto_main]} {
        return
     }
 
 
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
 
 
 gdb_load_shlib ${lib_so}
 
-if ![runto_main] then {
+if {![runto_main]} {
     return
 }
 
 
 # 2) Set a pending breakpoint at bar in $srcfile3.
 set result [gdb_breakpoint bar allow-pending]
-if {!$result} then {
+if {!$result} {
    return
 }
 
                     "add symbol table from file \".*${lib_basename}\\.so\"\
  at.*\\(y or n\\) " \
                     "y"]
-if {$result != 0} then {
+if {$result != 0} {
    return
 }
 
 
 # 6) Set a breakpoint at foo in $srcfile3.
 set result [gdb_breakpoint foo]
-if {!$result} then {
+if {!$result} {
     return
 }
 
 # 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
 }
 
                     "Remove symbol table from file \".*${lib_basename}\\.so\"\\?\
 .*\\(y or n\\) " \
                     "y"]
-if {$result != 0} then {
+if {$result != 0} {
     return
 }
 
 
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return
 }
 
 
     "No saved terminal information.*" \
     "test info terminal pre-execution"
 
-if ![runto break_here] then {
+if {![runto break_here]} {
     return 0
 }
 
 
 
 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.
 
 
 clean_restart ${binfile}
 gdb_load_shlib ${libobj}
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
 
 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
 }
 
 
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
 
     return
 }
 
-if ![runto test] then {
+if {![runto test]} {
     perror "couldn't run to breakpoint"
     return
 }
 
 #
 # 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
 }
 # 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 "*-*-*" 
 
 
     clean_restart ${testfile}
 
-    if { ![runto_main] } then {
+    if {![runto_main]} {
        return
     }
 
 
     gdb_test_no_output "set can-use-hw-watchpoints 0" ""
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return
 }
 
     gdb_test_no_output "set can-use-hw-watchpoints 0" ""
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return
 }
 
     gdb_test_no_output "set can-use-hw-watchpoints 0" ""
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return
 }
 
 
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return
 }
 
 
     return -1
 }
 
-if { ![runto_main] } then {
+if {![runto_main]} {
     return
 }
 
 
 
     clean_restart ${testfile}
 
-    if { ![runto_main] } then {
+    if {![runto_main]} {
        return
     }
 
 
 
 clean_restart ${binfile}
 
-if { ![runto_main] } then {
+if {![runto_main]} {
    return
 }
 
 
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
 
     return -1
 }
 
-if { ![runto_main] } then {
+if {![runto_main]} {
     return
 }
 
 
        clean_restart $binfile
 
-       if { ![runto_main] } then {
+       if {![runto_main]} {
            return
        }
 
 
 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
     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\\\]"
        }
 
        # 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.
 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.*"
 
     # 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"
     # 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 {
     # (This proves rather little on kernels that don't support
     # fast watchpoints, but still...)
     #
-    if ![runto_main] then {
+    if {![runto_main]} {
        return
     }
 
            "disable fast watches, 1"
     }
 
-    if [initialize] then {
+    if {[initialize]} {
 
        test_simple_watchpoint
 
     # 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
     }
 
 
 }
 
 set bp_location [gdb_get_line_number "START"]
-if ![runto "wchar.c:$bp_location" ] then {
+if {![runto "wchar.c:$bp_location"]} {
   return -1
 }
 
 
 # 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
 }
 
        return 0
     }
 
-    if ![runto_main] then {
+    if {![runto_main]} {
        return 0
     }
 
 }
 
 foreach_with_prefix lang {"c" "c++"} {
-    if { [prepare $lang] } then {
+    if {[prepare $lang]} {
        run_tests $lang
     }
 }
 
 
     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"
        }
 
        # 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"