standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
- return -1
+ return
}
# The test proper. NON_STOP indicates whether we're testing in
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
- return -1
+ return
}
# At this point GDB will be busy handling the breakpoint hits and
#
if {[build_executable $testfile $executable_nothr $srcfile] == -1} {
untested "attach-into-signal.exp (nonthreaded)"
- return -1
+ return
}
corefunc nonthreaded ${executable_nothr}
#
if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" [standard_output_file ${executable_thr}] executable {debug additional_flags=-DUSE_THREADS}] != "" } {
untested "attach-into-signal.exp (threaded)"
- return -1
+ return
}
corefunc threaded ${executable_thr}
if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
$options] == -1} {
- return -1
+ return
}
test
}
if {[build_executable "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
- return -1
+ return
}
foreach_with_prefix target-non-stop {"off" "on"} {
# Make sure we get UNTESTED rather than UNRESOLVED.
set errcnt 0
untested "Couldn't start GDB with preloaded lib"
- return -1
+ return
}
# Load binary, and attach to running program.
#
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
untested "attach-stopped.exp (unthreaded)"
- return -1
+ return
}
corefunc nonthreaded
#
if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DUSE_THREADS}] != "" } {
untested "attach-stopped.exp (threaded)"
- return -1
+ return
}
corefunc threaded
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
- return -1
+ return
}
clean_restart $::testfile
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
- return -1
+ return
}
# The test proper. UPDATE_THREAD_LIST indicates whether we should do
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable debug] != "" } {
- return -1
+ return
}
# Case 1: libthread_db fakes a single thread with th_unique == NULL.
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug}]} {
- return -1
+ return
}
set test_spawn_id [spawn_wait_for_attach $binfile]
}
if { [prepare_for_testing "failed to prepare" clone-new-thread-event] } {
- return -1
+ return
}
if { ![runto_main] } {
- return -1
+ return
}
gdb_test "continue" \
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test "break clone_fn" "Breakpoint.*at.*file.*$srcfile.*line.*"
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
- return -1
+ return
}
proc test {} {
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
set break_line [gdb_get_line_number "break here"]
set executable ${testfile}
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- return -1
+ return
}
set iterations 10
}
if { [prepare_for_testing "failed to prepare" current-lwp-dead] } {
- return -1
+ return
}
if {[runto_main] <= 0} {
- return -1
+ return
}
# Run to "fn" so that thread 2 is made current.
if { [gdb_compile_shlib $srcfile_lib $binfile_lib {}] != "" } {
untested "failed to compile shared library 1"
- return -1
+ return
}
set binfile_lib_target [gdb_download_shlib $binfile_lib]
[list debug \
additional_flags=-DSHLIB_NAME=\"$binfile_lib_target\" \
shlib_load pthreads]] } {
- return -1
+ return
}
gdb_locate_shlib $binfile_lib
set options { "additional_flags=-DTIMEOUT=$timeout" debug pthreads }
if {[prepare_for_testing "failed to prepare" $testfile $srcfile $options] == -1} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Probe support for "set breakpoint condition-evaluation target".
set relink_args [build_executable_own_libs ${testfile}.exp ${executable}.so $srclibfile {debug shlib_pthreads} no]
if {$relink_args == "" || ![prelink_no $relink_args]
|| [prepare_for_testing "failed to prepare" ${executable} ${srcmainfile} {debug shlib_load}] } {
- return -1
+ return
}
gdb_load_shlib $binfile_lib
if { ![runto_main] } {
- return -1
+ return
}
set probe_names {}
if { !$have_probe } {
untested "no matching probes"
- return -1
+ return
}
# We link the exec without -lpthread, but libpthread.so may already be loaded at main
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- return -1
+ return
}
# New image, that does not load a thread library.
set binfile1 [standard_output_file ${testfile1}]
if {[gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile1}" executable {debug}] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
set linenum [gdb_get_line_number "set break here"]
if {[build_executable "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
- return -1
+ return
}
# Assume yes.
set corefile [standard_output_file ${testfile}.core]
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
gdb_test_no_output "set non-stop on"
if {![runto_main]} {
- return -1
+ return
}
gdb_test_multiple "info threads" "threads are supported" {
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${objfile}" object $opts] != ""
|| ([gdb_compile_pthreads "${objfile}" "${binfile}" executable [concat $opts {ldflags=-Wl,-z,norelro}] ] != ""
&& [gdb_compile_pthreads "${objfile}" "${binfile}" executable $opts] != "") } {
- return -1
+ return
}
# Now we can proceed with the real testing.
set timeout 30
if {![runto_main]} {
- return -1
+ return
}
gdb_test_multiple "info threads" "threads are supported" {
require {!target_info exists gdb,cannot_call_functions}
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-DNR_THREADS=$NR_THREADS"]] != "" } {
- return -1
+ return
}
proc get_dummy_frame_number { } {
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}]} {
- return -1
+ return
}
if {![runto_main]} {
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" ${binfile} executable [list debug additional_flags=-lrt]] != "" } {
- return -1
+ return
}
clean_restart $testfile
if {![runto_main]} {
- return -1
+ return
}
set test "info addr label"
if {[build_executable "failed to prepare" $testfile $srcfile \
{debug pthreads}] == -1} {
- return -1
+ return
}
# Start GDB. Ensure we are in non-stop mode as we need to read from
}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint breakpt
# Wait until we can see that the extra thread has been created.
if {![wait_for_stage 1]} {
unresolved "failed to see thread start"
- return -1
+ return
}
# Wait until the extra thread has exited.
if {![wait_for_stage 2]} {
unresolved "failed to see thread start"
- return -1
+ return
}
# Check that the second thread has gone away.
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint breakpt
if {[gdb_compile_pthreads \
"${srcdir}/${subdir}/${srcfile} ${srcdir}/${subdir}/${srcfile2}" \
"${binfile}" executable {debug}] != "" } {
- return -1
+ return
}
clean_restart ${executable}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint "start"
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable debug] != "" } {
- return -1
+ return
}
save_vars { GDBFLAGS } {
}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint "stop_here"
if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
{debug pthreads}] == -1} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Read the number of threads out of the inferior.
require {!target_info exists gdb,cannot_call_functions}
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-DNR_THREADS=$NR_THREADS"]] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
{pthreads debug}] == -1} {
- return -1
+ return
}
if { ![runto "all_started"] } {
- return -1
+ return
}
delete_breakpoints
set testpid [get_valueof "" "pid" -1 "get pid of inferior"]
if { $testpid == -1 } {
- return -1
+ return
}
remote_exec target "kill -9 ${testpid}"
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
- return -1
+ return
}
set executable ${testfile}
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- return -1
+ return
}
clean_restart ${executable}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint [gdb_get_line_number "break-here"]
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != ""} {
- return -1
+ return
}
clean_restart ${::testfile}
if {[gdb_compile_pthreads \
"${srcdir}/${subdir}/${srcfile}" \
"${binfile}" executable {debug} ] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
if {[build_executable "failed to prepare" $testfile $srcfile \
{debug pthreads}] == -1} {
- return -1
+ return
}
# Run the test. When SPAWN_INFERIOR is true the inferior is started
}
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $opts] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
standard_testfile multi-create.c
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
- return -1
+ return
}
gdb_test_no_output "set pagination off"
gdb_test_no_output "set non-stop on"
if {![runto_main]} {
- return -1
+ return
}
# Create a breakpoint that does "info threads" when hit, which will be
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable {debug}] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable [list debug "incdir=${objdir}"]] != "" } {
- return -1
+ return
}
# Prepare environment for test.
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}]} {
- return -1
+ return
}
if {![runto "all_threads_ready"]} {
if {[build_executable "failed to prepare" $testfile $srcfile \
{debug pthreads}] == -1} {
- return -1
+ return
}
# Test all "set scheduler-locking" variants.
if {[prepare_for_testing "failed to prepare" \
$testfile $srcfile {c++ debug pthreads}] == -1} {
- return -1
+ return
}
if {![runto_main]} {
set executable ${testfile}
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- return -1
+ return
}
clean_restart ${executable}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint $srcfile:[gdb_get_line_number "break-here"]
set executable ${testfile}
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- return -1
+ return
}
proc do_test { lock_sched nonstop } {
set executable ${testfile}
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- return -1
+ return
}
proc do_test { lock_sched nonstop } {
set executable ${testfile}
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- return -1
+ return
}
proc do_test { lock_sched nonstop } {
set executable ${testfile}
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- return -1
+ return
}
proc do_test { lock_sched nonstop } {
set executable ${testfile}
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint [gdb_get_line_number "break-here"]
set options { "additional_flags=-DTIMEOUT=$timeout" debug pthreads }
if {[prepare_for_testing "failed to prepare" $testfile $srcfile $options] == -1} {
- return -1
+ return
}
gdb_test_no_output "set non-stop on"
if {![runto_main]} {
- return -1
+ return
}
# We want "handle print", to make sure the target backend reports the
}
if {[prepare_for_testing "failed to prepare" $testfile $srcfile $opts]} {
- return -1
+ return
}
# gdb_openmp_setup may be defined to set auto-load safe-path and possibly
}
if {![runto_main]} {
- return -1
+ return
}
# We want to invoke setup_kfail (and in some cases setup_xfail) when
set opts {openmp debug}
if {[prepare_for_testing "failed to prepare" $testfile $srcfile $opts]} {
- return -1
+ return
}
if {[info procs gdb_openmp_setup] != ""} {
}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint [gdb_get_line_number "omp task shared"]
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
set horiz "\[^\n\r\]*"
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
- return -1
+ return
}
# Now we can proceed with the real testing.
set linenum [gdb_get_line_number "set break here"]
if {[build_executable "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
- return -1
+ return
}
# The test proper. If COND_BP_TARGET is true, then test with
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
- return -1
+ return
}
for {set iteration 0} {$iteration < 10} {incr iteration} {
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
}
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable { debug }] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
"${binfile}" \
executable {debug}] != "" } {
untested "failed to compile"
- return -1
+ return
}
clean_restart $executable
set NUM 2
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
- return -1
+ return
}
# Now we can proceed with the real testing.
${binfile} \
executable \
[list debug additional_flags=-lrt]] != "" } {
- return -1
+ return
}
clean_restart $testfile
if {![runto_main]} {
- return -1
+ return
}
# `nostop noprint pass' could in some cases report false PASS due to
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable { debug }] != "" } {
- return -1
+ return
}
# Run the test proper. STEP_OVER indicates whether we leave in place
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable { debug }] != "" } {
- return -1
+ return
}
# Run the test proper. SCHEDLOCK indicates which variant (around
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable { debug }] != "" } {
- return -1
+ return
}
# Run test proper. COMMAND indicates whether to resume the inferior
if {[build_executable "failed to prepare" $testfile $srcfile \
{debug pthreads}]} {
- return -1
+ return
}
# Run test proper. SIGTRAP_THREAD is the thread that should get the
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable [list debug "incdir=${objdir}"]] != "" } {
- return -1
+ return
}
proc get_value {var test} {
clean_restart $executable
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint [gdb_get_line_number "set wait-thread-2 breakpoint here"]
if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
untested "failed to compile"
- return -1
+ return
}
clean_restart $executable
if {![runto_main]} {
- return -1
+ return
}
# `noprint' would not test the full logic of GDB.
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable { debug }] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
- return -1
+ return
}
if {![runto_main]} {
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable [list debug "incdir=${objdir}"]] != "" } {
- return -1
+ return
}
# The test proper. DISPLACED is true if we should try with displaced
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable [list debug "incdir=${objdir}"]] != "" } {
- return -1
+ return
}
# The test proper. DISPLACED is true if we should try with displaced
"${binfile}" \
executable {debug}] != "" } {
untested "failed to compile"
- return -1
+ return
}
clean_restart $executable
# Start the second thread.
if {![runto start]} {
- return -1
+ return
}
# Go back to the main thread, and leave it in the loop, where we're
if {[prepare_for_testing "failed to prepare" \
"${testfile}" "${srcfile}" {debug pthreads}]} {
- return -1
+ return
}
if {![runto_main]} {
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
if {[build_executable "failed to prepare" $testfile $srcfile \
{debug pthreads}] == -1} {
- return -1
+ return
}
# We need to do things a little differently when using the remote protocol.
}
if {![runto_main]} {
- return -1
+ return
}
# Check we hace non-stop mode. We do try to force this on above, but maybe
# non-stop mode will still show as off, and this test should not be run.
if {![is_target_non_stop]} {
unsupported "required non-stop mode"
- return -1
+ return
}
delete_breakpoints
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable debug] != "" } {
- return -1
+ return
}
# Run the test proper. SCHEDLOCK specifies what scheduler-locking
standard_testfile linux-dp.c
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != ""} {
- return -1
+ return
}
clean_restart ${::testfile}
if {[gdb_compile_pthreads \
"${srcdir}/${subdir}/${srcfile}" \
"${binfile}" executable {debug} ] != "" } {
- return -1
+ return
}
# Extract and return the thread ID of the thread stopped at function
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
- return -1
+ return
}
# Return a list of the valid thread IDs, with the initial thread first.
require {!target_info exists gdb,cannot_call_functions}
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-DNR_THREADS=$NR_THREADS"]] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
- return -1
+ return
}
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
- return -1
+ return
}
proc gdb_test_thread_start {messages_enabled command pattern message} {
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
{debug pthreads}]} {
- return -1
+ return
}
clean_restart ${::testfile}
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable debug] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile { debug pthreads }] == -1} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
delete_breakpoints
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable { debug }] != "" } {
- return -1
+ return
}
# Generate a native core file.
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
{pie}] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
}
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable []] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
if { [build_executable "build library" ${binsharedfile} ${srcsharedfile} \
{debug shlib additional_flags=-std=c11}] == -1 } {
untested "Couldn't compile test library"
- return -1
+ return
}
# Strip debug information from $binsharedfile, placing it in
"${binmainfile}" executable [list debug additional_flags=-std=c11]] \
!= "" } {
untested "Couldn't compile test program"
- return -1
+ return
}
set absdir [file dirname [standard_output_file ${binsharedbase}]]
if { [gdb_compile_shlib_pthreads ${srcdir}/${subdir}/${srcfile_lib} ${binfile_lib} {debug}] != ""
|| [gdb_compile_pthreads ${srcdir}/${subdir}/${srcfile} ${binfile} executable [list debug shlib=${binfile_lib}]] != ""} {
- return -1
+ return
}
if { [gdb_compile_shlib_pthreads ${srcdir}/${subdir}/${srcfile_lib} ${binfile_lib} {debug}] != ""
|| [gdb_compile_pthreads ${srcdir}/${subdir}/${srcfile} ${binfile} executable [list debug shlib=${binfile_lib}]] != ""} {
- return -1
+ return
}
if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${objfile} object {debug}] != ""
|| [gdb_compile ${srcdir}/${subdir}/${srcmainfile} ${objmainfile} object {}] != ""
|| [gdb_compile_pthreads "${objfile} ${objmainfile}" ${binfile} executable {}] != ""} {
- return -1
+ return
}
clean_restart ${executable}
}
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile} ${srcdir}/${subdir}/${srcfile2}" "${binfile}" executable [list c++ debug]] != "" } {
- return -1
+ return
}
### Compute the value of the a_thread_local variable.
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile {debug pthreads}]} {
- return -1
+ return
}
# DETACH indicates whether "set detach-on-fork" is enabled. It is
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile {debug pthreads}]} {
- return -1
+ return
}
# DETACH indicates whether "set detach-on-fork" is enabled. It is
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
$opts] != "" } {
untested "failed to compile"
- return -1
+ return
}
# Compile the secondary program, which just sleeps.
if { [gdb_compile "${srcdir}/${subdir}/${srcfile_sleep}" "${binfile_sleep}" executable \
{debug}] != "" } {
untested "failed to compile"
- return -1
+ return
}
# We exercise two methods of getting a second inferior to execute while the
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" ${binfile} executable [list debug additional_flags=-lrt]] != "" } {
- return -1
+ return
}
foreach reorder {0 1} { with_test_prefix "reorder$reorder" {
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
- return -1
+ return
}
clean_restart $::testfile
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-DNR_THREADS=$NR_THREADS -DX_INCR_COUNT=$X_INCR_COUNT"]] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
} else {
fail "all threads started"
# No point in continuing.
- return -1
+ return
}
# Check that multiple uses of the 'thread' keyword will give an error.
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-DNR_THREADS=$NR_THREADS -DNR_TRIGGERS_PER_THREAD=$NR_TRIGGERS_PER_THREAD"]] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}