# We should be able to do an info threads before starting any others.
send_gdb "info threads\n"
gdb_expect {
- -re ".*Thread.*LWP.*main.*$gdb_prompt $" {
+ -re ".*Thread.*main.*$gdb_prompt $" {
pass "info threads"
}
-re "\r\n$gdb_prompt $" {
- pass "info threads"
- setup_xfail "*-*-*"
- fail "gdb does not support pthreads for this machine"
+ unsupported "gdb does not support pthreads for this machine"
return 0
}
}
# Send a continue followed by ^C to the process to stop it.
send_gdb "continue\n"
+ gdb_expect {
+ -re "Continuing." {
+ pass "Continue with all threads running"
+ }
+ timeout {
+ fail "Continue with all threads running (timeout)"
+ }
+ }
+ sleep 1
set description "Stopped with a ^C"
after 1000 [send_gdb "\003"]
gdb_expect {
}
timeout {
fail "$description (timeout)"
+ return 1;
}
}
gdb_test "bt" ""
if [all_threads_running] then {
pass "All threads running after continuing from ^C stop"
}
+ return 0;
}
proc check_backtraces {} {
if [runto_main] then {
clear_xfail "alpha-*-osf*"
if [test_startup] then {
- check_control_c
+ if [check_control_c] then {
+ warning "Could not stop child with ^C; skipping rest of tests.\n"
+ return;
+ }
check_backtraces
}
}