# along with this program. If not, see <http://www.gnu.org/licenses/>.
# This only works on targets with the Linux kernel.
-if ![istarget *-*-linux*] then {
+if {![istarget *-*-linux*]} {
return
}
standard_testfile
# This only works with on Linux targets.
-if ![istarget *-*-linux*] then {
+if {![istarget *-*-linux*]} {
return
}
gdb_test "inferior 2" "Switching to .*"
gdb_load $::binfile
- if ![runto setup_done] then {
+ if {![runto setup_done]} {
fail "can't run to setup_done"
kill_wait_spawned_process $test_spawn_id
return
clean_restart ${binfile}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
set GDBFLAGS $saved_gdbflags
- if ![runto_main] then {
+ if {![runto_main]} {
return 0
}
clean_restart ${binfile}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
clean_restart $binfile
gdb_test_no_output "set displaced on"
- if ![runto_main] then {
+ if {![runto_main]} {
return 0
}
clean_restart $binfile
set GDBFLAGS $saved_gdbflags
- if ![runto_main] then {
+ if {![runto_main]} {
return 0
}
gdb_test_no_output "set non-stop on"
-if { ! [ runto_main ] } then {
+if {![runto_main]} {
return -1
}
set corefile $binfile.test
set core0file ${binfile}0.test
-if [istarget "*-*-linux"] then {
+if {[istarget "*-*-linux"]} {
set target_cflags "-D_MIT_POSIX_THREADS"
} else {
set target_cflags ""
set timeout 30
-if { ! [ runto_main ] } then {
+if {![runto_main]} {
return -1
}
return -1
}
- if { ![runto_main] } then {
+ if {![runto_main]} {
return
}
# This only works with Linux configurations.
-if ![istarget *-*-linux-gnu*] then {
+if {![istarget *-*-linux-gnu*]} {
return
}
gdb_test_no_output "set can-use-hw-watchpoints 1" ""
-if ![runto_main] then {
+if {![runto_main]} {
return
}
clean_restart "${binfile}"
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
clean_restart ${binfile}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
clean_restart $binfile
set GDBFLAGS $saved_gdbflags
- if ![runto_main] then {
+ if {![runto_main]} {
return 0
}
# carriage return)
set horiz "\[^\n\r\]*"
-if [istarget "*-*-linux"] then {
+if {[istarget "*-*-linux"]} {
set target_cflags "-D_MIT_POSIX_THREADS"
} else {
set target_cflags ""
}
}
- if { $return_me == 1 } then {
+ if {$return_me == 1} {
return 0
}
}
}
- if { $return_me == 1 } then {
+ if {$return_me == 1} {
return 0
}
# Verify that all threads are running.
with_test_prefix "after startup" {
- if [all_threads_running] then {
+ if {[all_threads_running]} {
pass "all threads running after startup"
}
}
# Verify that all threads can be run again after a ^C stop.
with_test_prefix "after continue" {
- if [all_threads_running] then {
+ if {[all_threads_running]} {
pass "all threads running after continuing from ^C stop"
}
}
}
-if [runto_main] then {
- if [test_startup] then {
- if [check_control_c] then {
+if {[runto_main]} {
+ if {[test_startup]} {
+ if {[check_control_c]} {
warning "Could not stop child with ^C; skipping rest of tests.\n"
return
}
clean_restart $executable
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
with_test_prefix "step-over $step_over" {
clean_restart ${binfile}
- if ![runto_main] then {
+ if {![runto_main]} {
return 0
}
with_test_prefix "schedlock $schedlock" {
clean_restart ${binfile}
- if ![runto_main] then {
+ if {![runto_main]} {
return 0
}
with_test_prefix "$command" {
clean_restart ${binfile}
- if ![runto_main] then {
+ if {![runto_main]} {
return 0
}
with_test_prefix "sigtrap thread $sigtrap_thread" {
clean_restart ${binfile}
- if ![runto "thread_function"] then {
+ if {![runto "thread_function"]} {
return 0
}
clean_restart ${binfile}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
return -1
}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
}
}
-if { [info exists thread6] } then {
+if {[info exists thread6]} {
gdb_test "echo $thread6\\n" "$thread6" "got thread ids"
}
}
}
-if { [info exists process6] } then {
+if {[info exists process6]} {
gdb_test "echo $process6\\n" "$process6" "got process ids"
}
}
}
-if { [info exists lwp6] } then {
+if {[info exists lwp6]} {
gdb_test "echo $lwp6\\n" "$lwp6" "got lwp ids"
}
# Test 'thread find' with thread ids, if any.
#
-if { [info exists thread6] } then {
+if {[info exists thread6]} {
gdb_test "thread find $thread6" \
"Thread 6 has .*$thread6.*" "find thread id 6"
gdb_test "thread find $thread5" \
# Test 'thread find' with process ids, if any.
#
-if { [info exists process6] } then {
+if {[info exists process6]} {
gdb_test "thread find $process6" \
"Thread 6 has .*$process6.*" "find process id 6"
gdb_test "thread find $process5" \
# Test 'thread find' with lwp ids, if any.
#
-if { [info exists lwp6] } then {
+if {[info exists lwp6]} {
gdb_test "thread find $lwp6" \
"Thread 6 has .*$lwp6.*" "find lwp id 6"
gdb_test "thread find $lwp5" \
exp_continue
}
-re ".*$gdb_prompt $" {
- if { $see3 && $see4 && $see5 && !$see1 && !$see2 && !$see6 } then {
+ if {$see3 && $see4 && $see5 && !$see1 && !$see2 && !$see6} {
pass "test regular exp"
} else {
fail "test regular exp"
exp_continue
}
-re "$gdb_prompt $" {
- if { $see2 && $see4 && $see6 && !$see1 && !$see3 && !$see5 } then {
+ if {$see2 && $see4 && $see6 && !$see1 && !$see3 && !$see5} {
pass "info threads 2 4 6"
} else {
fail "info threads 2 4 6"
exp_continue
}
-re "$gdb_prompt $" {
- if { $see3 && $see4 && $see5 && !$see1 && !$see2 && !$see6 } then {
+ if {$see3 && $see4 && $see5 && !$see1 && !$see2 && !$see6} {
pass "info threads 3-5"
} else {
fail "info threads 3-5"
exp_continue
}
-re ".*$gdb_prompt $" {
- if { $see3 && !$see1 && !$see2 && !$see4 && !$see5 && !$see6 } then {
+ if {$see3 && !$see1 && !$see2 && !$see4 && !$see5 && !$see6} {
pass "info threads 3-3"
} else {
fail "info threads 3-3"
clean_restart ${binfile}
-if ![runto_main] then {
+if {![runto_main]} {
return 1
}
# This test has only been verified with Linux targets, and would need
# to be generalized to support other targets
-if ![istarget *-*-linux*] then {
+if {![istarget *-*-linux*]} {
return
}
# The initial thread may log a 'New Thread' message, but we don't
# check for it.
- if ![runto_main] then {
+ if {![runto_main]} {
return 1
}
# Run to `main' where we begin our tests.
#
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
}
clean_restart ${binfile}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
standard_testfile
-if [istarget "*-*-linux"] then {
+if {[istarget "*-*-linux"]} {
set target_cflags "-D_MIT_POSIX_THREADS"
} else {
set target_cflags ""
}
clean_restart ${binfile}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
clean_restart ${binfile}
gdb_load_shlib ${binfile_lib}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
clean_restart ${binfile}
gdb_load_shlib ${binfile_lib}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
standard_testfile tls.c tls2.c
-if [istarget "*-*-linux"] then {
+if {[istarget "*-*-linux"]} {
set target_cflags "-D_MIT_POSIX_THREADS"
} else {
set target_cflags ""
}
}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
clean_restart $binfile
- if ![runto_main] then {
+ if {![runto_main]} {
return 0
}
clean_restart $binfile
- if ![runto_main] then {
+ if {![runto_main]} {
return 0
}
# Run to `main' where we begin our tests.
#
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
# Run to `main' where we begin our tests.
#
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
gdb_test_no_output "set can-use-hw-watchpoints 1" ""
# Run to `main' where we begin our tests.
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}