}
# On NetBSD/ELF we need a special NetBSD-identifying note section.
-if { [istarget "*-*-netbsd*"] && ![istarget "*-*-netbsdaout*"] } then {
+if {[istarget "*-*-netbsd*"] && ![istarget "*-*-netbsdaout*"]} {
set asm-note "netbsd"
}
# On OpenBSD/ELF we need a similar note section. We make no attempt
# of handing a.out here since most OpenBSD/a.out systems use a rather
# outdated assembler that doesn't assemble this test's code anyway.
-if { [istarget "*-*-openbsd*"] } then {
+if {[istarget "*-*-openbsd*"]} {
set asm-note "openbsd"
}
}
# Allow the target board to override the debug flags.
-if { [board_info $dest exists debug_flags] } then {
+if {[board_info $dest exists debug_flags]} {
set debug-flags "[board_info $dest debug_flags]"
}
set asm1obj [standard_output_file asmrc1.o]
set asm2obj [standard_output_file asmrc2.o]
-if {[target_assemble ${srcdir}/${subdir}/${srcfile} $asm1obj "${asm-flags} ${debug-flags}"] != ""} then {
+if {[target_assemble ${srcdir}/${subdir}/${srcfile} $asm1obj "${asm-flags} ${debug-flags}"] != ""} {
untested "failed to assemble"
return -1
}
-if {[target_assemble ${srcdir}/${subdir}/${srcfile2} $asm2obj "${asm-flags} ${debug-flags}"] != ""} then {
+if {[target_assemble ${srcdir}/${subdir}/${srcfile2} $asm2obj "${asm-flags} ${debug-flags}"] != ""} {
untested "failed to assemble"
return -1
}
# code here that provides its own startup code. Using target_link
# also avoids a lot of problems on many systems, most notably on
# *-*-*bsd* and *-*-solaris2*.
-if {[target_link [list $asm1obj $asm2obj] "${binfile}" ${link-flags}] != "" } then {
+if {[target_link [list $asm1obj $asm2obj] "${binfile}" ${link-flags}] != ""} {
untested "failed to link"
return -1
}
# Run to `main' where we begin our tests.
#
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
}
clean_restart ${binfile}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
}
# 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 "print v_float_func" \
"$decimal = \{float \\(\\)\} 0x\[0-9a-z\]+.*" \
"print float function"
}
# 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"
return -1
}
-if ![runto MAIN__] then {
+if {![runto MAIN__]} {
perror "couldn't run to breakpoint MAIN__"
return
}
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return -1
}
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return -1
}
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return
}
gdb_load_shlib ${lib_so}
# Run to foo to make sure foo refers to the function, and not foo@PLT.
- if ![runto foo qualified] then {
+ if {![runto foo qualified]} {
return
}
# loaded for remote targets.
gdb_load_shlib ${lib_so}
- if ![runto_main] then {
+ if {![runto_main]} {
return
}
return -1
}
- if ![gdb_guile_runto_main] then {
+ if {![gdb_guile_runto_main]} {
return
}
standard_testfile
# Support for XML is needed to run this test.
-if [gdb_skip_xml_test] then {
+if {[gdb_skip_xml_test]} {
unsupported "list-thread-groups-available.exp"
return -1
}
# mi_run_cmd, it ignores whatever target the rest of GDB testsuite is
# using, and always tries to run natively. So, don't do anything unless
# we're actually testing native.
-if { !([isnative] && [istarget *-linux*]) } then {
+if {!([isnative] && [istarget *-linux*])} {
return
}
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-if ![isnative] then {
+if {![isnative]} {
return
}
# Get the address of the current breakpoint.
set bpaddr [breakpoint_address $bpnum]
- if {$bpaddr == ""} then { return }
+ if {$bpaddr == ""} { return }
# Check that the addresses are the same.
gdb_assert [expr $bpaddr == $pcval] "\$pc equals address of breakpoint in callee$i"
for {set i 0} {$i < 4} {incr i} {
- if { $i == 1 } then { set first_unchanging_varnum $varnum }
+ if {$i == 1} { set first_unchanging_varnum $varnum }
mi_gdb_test "-var-create --thread 1 --frame $i - \* \$pc" \
"\\^done,.*value=\"$hex.*" \
set MIFLAGS "-i=mi"
# This test is Linux-only.
-if ![istarget *-*-linux*] then {
+if {![istarget *-*-linux*]} {
unsupported "mi-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 "mi-info-os.exp"
return -1
}
"list changed registers"
}
-if [istarget "sparc-*-*"] then {
+if {[istarget "sparc-*-*"]} {
mi_clean_restart
sparc_register_tests_no_exec
mi_clean_restart $binfile
return -1
}
-if { ![runto_main] } then {
+if {![runto_main]} {
return -1
}
return -1
}
-if ![runto here] then {
+if {![runto here]} {
perror "couldn't run to breakpoint 'here'"
return
}
return -1
}
-if ![runto foo] then {
+if {![runto foo]} {
perror "couldn't run to breakpoint foo"
return
}
}
}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
return -1
}
-if { ![runto start_sequence] } then {
+if {![runto start_sequence]} {
return
}
return -1
}
-if ![runto f] then {
+if {![runto f]} {
perror "couldn't run to f"
return
}
clean_restart ${binfile}
gdb_load_shlib $binfile_lib
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
}
}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
-if [set_lang_pascal] then {
+if {[set_lang_pascal]} {
test_integer_literal_types_accepted
test_logical_literal_types_accepted
test_character_literal_types_accepted
set gdbserver_gdbport [lindex $res 1]
# Perform test actions to the symbol file on the target.
- if { $action == "delete" } then {
+ if {$action == "delete"} {
remote_file target delete $target_exec
} elseif { $action == "permission" } {
remote_exec target "chmod 000 $target_exec"
# extended-remote board, therefore already connected.
gdb_test "disconnect" ".*"
- if { [gdb_target_supports_trace] } then {
+ if {[gdb_target_supports_trace]} {
# Test predefined TSVs are uploaded.
gdb_test_sequence "info tvariables" "check uploaded tsv" {
"\[\r\n\]+Name\[\t \]+Initial\[\t \]+Current"
# This test also makes use of 'detach-on-fork' which is not supported
# on all platforms.
-if { ![istarget "*-*-linux*"] && ![istarget "*-*-openbsd*"] } then {
+if {![istarget "*-*-linux*"] && ![istarget "*-*-openbsd*"]} {
return
}
clean_restart ${binfile}
- if ![runto_main] then {
+ if {![runto_main]} {
return 0
}
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
perror "couldn't run to breakpoint"
return
}
int y;$eol
}$eol"
-if { [test_debug_format "stabs"] } then {
+if {[test_debug_format "stabs"]} {
setup_kfail "gdb/1602" *-*-*
}
gdb_test "ptype v2" "type = struct a {$eol
const char .c;$eol
}$eol"
-if { [test_debug_format "stabs"] } then {
+if {[test_debug_format "stabs"]} {
setup_kfail "gdb/1603" *-*-*
}
gdb_test "ptype v3" "type = const char ."
clean_restart $binfile
if {$execution} {
- if ![runto_main] then {
+ if {![runto_main]} {
return 0
}
}
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
gdb_load ${binfile}
# Run to `main' where we begin our tests.
-if ![runto_main] then {
+if {![runto_main]} {
return -1
}