@@ -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"
}
@@ -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
}
@@ -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
@@ -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
}
@@ -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
}
@@ -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
}
@@ -20,7 +20,7 @@ if { [prepare_for_testing "failed to prepare" $testfile $srcfile {debug}] } {
return -1
}
-if { ![runto_main] } then {
+if {![runto_main]} {
return
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -47,7 +47,7 @@ proc start_program {binfile} {
clean_restart $binfile
- if ![runto setup_done] then {
+ if {![runto setup_done]} {
return 0
}
@@ -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
}
@@ -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
}
@@ -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;"]
@@ -21,7 +21,7 @@ if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
@@ -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
}
@@ -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"]
@@ -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
@@ -44,7 +44,7 @@ proc test {always_inserted sw_watchpoint} {
clean_restart $binfile
- if ![runto_main] then {
+ if {![runto_main]} {
return -1
}
@@ -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
}
@@ -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
}
@@ -176,7 +176,7 @@ gdb_test_multiple "info break 2 4 6" "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 2 4 6"
} else {
fail "info break 2 4 6"
@@ -217,7 +217,7 @@ gdb_test_multiple "info break 3-5" "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 "info break 3-5"
} else {
fail "info break 3-5"
@@ -275,7 +275,7 @@ with_test_prefix "with value history" {
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"
@@ -323,7 +323,7 @@ with_test_prefix "with convenience vars" {
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"
@@ -479,7 +479,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
}
@@ -534,7 +534,7 @@ gdb_test "break if (1)" \
# 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
}
@@ -652,7 +652,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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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-*-*"
}
@@ -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
}
@@ -61,7 +61,7 @@ proc start_scalars_test { type } {
}
# Advance to main
- if { ![runto_main] } then {
+ if {![runto_main]} {
return
}
@@ -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
}
@@ -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"
@@ -23,7 +23,7 @@
# Until "catch fork" is implemented on other targets...
#
-if { ![istarget "*-*-linux*"] && ![istarget "*-*-openbsd*"] } then {
+if {![istarget "*-*-linux*"] && ![istarget "*-*-openbsd*"]} {
return
}
@@ -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
}
@@ -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
@@ -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
}
@@ -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
}
@@ -79,7 +79,7 @@ gdb_test_multiple $command $test {
}
# Now get past startup code.
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
@@ -57,7 +57,7 @@ if {[prepare_for_testing "failed to prepare" $testfile \
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
perror "tests suppressed"
}
@@ -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
}
@@ -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"
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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)"
@@ -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 "*-*-*"
@@ -16,7 +16,7 @@
standard_testfile
# This test is Linux-only.
-if ![istarget *-*-linux*] then {
+if {![istarget *-*-linux*]} {
untested "coredump-filter.exp"
return -1
}
@@ -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"
}
@@ -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
}
@@ -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
}
@@ -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"
@@ -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
}
@@ -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 $" { }
@@ -747,7 +747,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 $" { }
@@ -765,7 +765,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 $" { }
@@ -782,7 +782,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 $" { }
@@ -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
}
@@ -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
}
@@ -19,7 +19,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile}] } {
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
@@ -60,7 +60,7 @@ if !$use_gdb_stub {
# Ok, on to real life
#
-if ![runto_main] then {
+if {![runto_main]} {
return
}
@@ -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
}
@@ -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"
@@ -26,7 +26,7 @@ proc test_setup { count } {
clean_restart ${binfile}
- if ![runto_main] then {
+ if {![runto_main]} {
return 0
}
@@ -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
@@ -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
}
@@ -116,7 +116,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
}
@@ -147,7 +147,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
}
@@ -186,7 +186,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
}
@@ -247,7 +247,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
}
@@ -279,7 +279,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
}
@@ -308,7 +308,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
}
@@ -336,7 +336,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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -37,7 +37,7 @@ if { ! [file exists $binfile] } {
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
perror "couldn't run to breakpoint"
return
}
@@ -46,7 +46,7 @@ proc do_exec_sysroot_test {} {
# Start the program running, and stop at main.
#
- if ![runto_main] then {
+ if {![runto_main]} {
return
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
@@ -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
}
@@ -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
}
@@ -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
}
@@ -18,7 +18,7 @@
# Until "catch exec" is implemented on other targets...
#
-if { ![istarget "*-linux*"] } then {
+if {![istarget "*-linux*"]} {
return
}
@@ -47,7 +47,7 @@ proc do_exec_tests {} {
# Start the program running, and stop at main.
#
- if ![runto_main] then {
+ if {![runto_main]} {
return
}
@@ -73,7 +73,7 @@ proc do_exec_tests {} {
# Start the program running, and stop at main.
#
- if ![runto_main] then {
+ if {![runto_main]} {
return
}
@@ -162,7 +162,7 @@ proc do_exec_tests {} {
# Start the program running, and stop at main.
#
- if ![runto_main] then {
+ if {![runto_main]} {
return
}
@@ -230,7 +230,7 @@ proc do_exec_tests {} {
# Start the program running, and stop at main.
#
- if ![runto_main] then {
+ if {![runto_main]} {
return
}
@@ -297,7 +297,7 @@ proc do_exec_tests {} {
# Start the program running, and stop at main.
#
- if ![runto_main] then {
+ if {![runto_main]} {
return
}
@@ -358,7 +358,7 @@ proc do_exec_tests {} {
# Start the program running, and stop at main.
#
- if ![runto_main] then {
+ if {![runto_main]} {
return
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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"
}
@@ -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
}
@@ -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"
@@ -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
}
@@ -31,7 +31,7 @@ if { [prepare_for_testing "failed to prepare" $testfile $testfile.c {debug}] } {
}
-if { ![runto_main] } then {
+if {![runto_main]} {
return
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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\\}"
@@ -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
}
@@ -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
}
@@ -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
}
@@ -39,7 +39,7 @@ proc setup {commands} {
clean_restart $binfile
- if ![runto_main] then {
+ if {![runto_main]} {
return -code return
}
@@ -42,7 +42,7 @@ clean_restart ${binfile}
set prev_timeout $timeout
set timeout 30
-if { ! [ runto_main ] } then {
+if {![runto_main]} {
return -1
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -53,7 +53,7 @@ foreach_with_prefix n_flag { 0 1 } {
clean_restart $executable
- if ![runto_main] then {
+ if {![runto_main]} {
return 0
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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"
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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"
@@ -39,7 +39,7 @@ proc run_test { opt_level } {
return
}
- if { ![runto_main] } then {
+ if {![runto_main]} {
return
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -39,7 +39,7 @@ if [prepare_for_testing "failed to prepare" $testfile {} {debug}] {
return -1
}
-if { ![runto_main] } then {
+if {![runto_main]} {
return
}
@@ -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
}
@@ -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
}
@@ -25,7 +25,7 @@ if {[prepare_for_testing "failed to prepare" $testfile \
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return -1
}
@@ -22,7 +22,7 @@ if {[prepare_for_testing "failed to prepare" $testfile \
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return -1
}
@@ -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"
}
@@ -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"
@@ -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"
@@ -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
@@ -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
}
@@ -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
}
@@ -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"
}
@@ -22,7 +22,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} {
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return -1
}
@@ -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
}
@@ -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
}
@@ -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"
@@ -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
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
}
@@ -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
}
@@ -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
}
@@ -40,7 +40,7 @@ if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
@@ -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
}
@@ -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
}
@@ -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"
@@ -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"} {
@@ -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"
@@ -34,7 +34,7 @@ save_vars { GDBFLAGS } {
}
}
-if ![runto_main] then {
+if {![runto_main]} {
perror "couldn't run to breakpoint"
return
}
@@ -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"
@@ -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
}
@@ -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
}
@@ -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"
}
@@ -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. $" {
@@ -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"
}
}
@@ -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
}
@@ -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 }
@@ -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
}
@@ -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
@@ -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
}
@@ -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
}
@@ -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"
@@ -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"
}
@@ -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
}
@@ -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"
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -81,7 +81,7 @@ remote_close target
clean_restart $binfile
-if { ! [ runto_main ] } then {
+if {![runto_main]} {
return -1
}
@@ -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.
@@ -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
}
@@ -46,7 +46,7 @@ clean_restart ${binfile}
# Run to `main' where we begin our tests.
#
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
@@ -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
}
@@ -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
}
@@ -40,7 +40,7 @@ gdb_load_shlib $lib_sl
# This program implicitly loads SOM shared libraries.
#
-if ![runto_main] then {
+if {![runto_main]} {
return
}
@@ -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
}
@@ -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
}
@@ -49,7 +49,7 @@ gdb_test "br foo2" \
delete_breakpoints
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -44,7 +44,7 @@ proc simple_func_break_test { protection } {
return -1
}
- if { ![runto_main] } then {
+ if {![runto_main]} {
return -1
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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]} {
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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.
@@ -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
}
@@ -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
}
@@ -31,7 +31,7 @@ if {[prepare_for_testing_full "failed to prepare" \
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
@@ -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
}
@@ -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 "*-*-*"
@@ -41,7 +41,7 @@ proc test_watchpoint { hw } {
clean_restart ${testfile}
- if { ![runto_main] } then {
+ if {![runto_main]} {
return
}
@@ -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
}
@@ -23,7 +23,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return
}
@@ -32,7 +32,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1
}
-if { ![runto_main] } then {
+if {![runto_main]} {
return
}
@@ -27,7 +27,7 @@ proc test_watchpoint_across_vfork { hw teststr } {
clean_restart ${testfile}
- if { ![runto_main] } then {
+ if {![runto_main]} {
return
}
@@ -35,7 +35,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
clean_restart ${binfile}
-if { ![runto_main] } then {
+if {![runto_main]} {
return
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
}
@@ -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"