# limit this test to running when ISNATIVE is true.
if { [gdb_compile_shlib_pthreads \
$libsrc $libobj {debug}] != "" } then {
- return -1
+ return
}
}
if { [gdb_compile_pthreads \
"${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable {debug}] != "" } {
- return -1
+ return
}
}
standard_testfile
set executable ${testfile}
if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
set corefile [core_find $binfile]
clean_restart ${executable}
if {![runto_main]} {
- return -1
+ return
}
set test "run till end"
}
-re "\r\n$gdb_prompt $" {
unsupported "gdb does not support threads on this target"
- return -1
+ return
}
}
}
-re "${nl}$gdb_prompt $" {
unsupported "gdb does not support threads on this target"
- return -1
+ return
}
}
set core_supported [gdb_gcore_cmd "$corefile" "save a corefile"]
if {!$core_supported} {
- return -1
+ return
}
# when it first notices that the thread library doesn't support
# debugging, or if we could explicitly ask GDB somehow.
unsupported "this GDB does not support threads on this system."
- return -1
+ return
}
-re "$gdb_prompt $" {
}
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
- executable {debug additional_flags=-std=gnu99}] != "" } {
- return -1
+ executable {debug additional_flags=-std=gnu99}] != "" } {
+ return
}
clean_restart "${::testfile}"
if {![runto_main]} {
- return 0
+ return
}
# Ensure that each new thread is detected by GDB in the order that the
if {[info procs gdb_openmp_setup] != ""} {
if {[gdb_openmp_setup $binfile] != ""} {
untested "could not set up OpenMP environment"
- return -1
+ return
}
}
if {[info procs gdb_openmp_setup] != ""} {
if {[gdb_openmp_setup $binfile] != ""} {
untested "could not set up OpenMP environment"
- return -1
+ return
}
}
}
}
if {$sigusr == ""} {
- return -1
+ return
}
set test "signal $sigcount si_signo"
break
}
if { $have_tls == "" } {
- return -1
+ return
}
}
if { "$have_tls" != "" } {
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint [gdb_get_line_number "tlsvar-is-set"]
gdb_continue_to_breakpoint "tlsvar-is-set" ".* tlsvar-is-set .*"
-re "^End of assembler dump\\.\r\n$gdb_prompt $" {
if { [llength $syscall_addrs] == 0 } {
unsupported "no syscalls found"
- return -1
+ return
}
}
}
set threads [get_thread_list]
if {[llength $threads] == 0} {
- # We have already issued a FAIL above.
- return 1
+ # We have already issued a FAIL above.
+ return
}
gdb_test {print $_thread} ".* = [lindex $threads 0]" "thread var in main"
clean_restart ${::testfile}
if {![runto_main]} {
- return 1
+ return
}
}
if {![runto_main]} {
- return 0
+ return
}
# Set a breakpoint at the "spin" routine to
# This is the first symptom if the gcc and binutils versions
# in use support TLS, but the system glibc does not.
unsupported "continue to first thread: system does not support TLS"
- return -1
+ return
}
-re ".*$inferior_exited_re normally.*$gdb_prompt $" {
fail "continue to first thread: program runaway"
gdb_test "set can-use-hw-watchpoints 1"
if {![runto_main]} {
- return -1
+ return
}
# Use "rwatch" as "watch" would report the watchpoint changed just based on its