mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-18 12:24:38 +08:00
* gdb.threads/watchpoint-fork.exp (test): Use
standard_output_file. Don't declare objdir. * gdb.threads/attach-into-signal.exp: Use standard_testfile, standard_output_file. * gdb.threads/attach-stopped.exp: Use standard_testfile. * gdb.threads/bp_in_thread.exp: Use standard_testfile, clean_restart. Remove incdir. * gdb.threads/corethreads.exp: Use standard_testfile. * gdb.threads/execl.exp: Use standard_testfile, standard_output_file, clean_restart. * gdb.threads/fork-child-threads.exp: Use standard_testfile, clean_restart. * gdb.threads/fork-thread-pending.exp: Use standard_testfile, clean_restart. * gdb.threads/gcore-thread.exp: Use standard_testfile. Remove incdir. * gdb.threads/hand-call-in-threads.exp: Use standard_testfile, clean_restart. Remove incdir. * gdb.threads/ia64-sigill.exp: Use standard_testfile. * gdb.threads/interrupted-hand-call.exp: Use standard_testfile, clean_restart. Remove incdir. * gdb.threads/killed.exp: Use standard_testfile, clean_restart. Remove incdir. * gdb.threads/leader-exit.exp: Use standard_testfile. * gdb.threads/linux-dp.exp: Use standard_testfile, clean_restart. * gdb.threads/local-watch-wrong-thread.exp: Use standard_testfile, clean_restart. * gdb.threads/manythreads.exp: Use standard_testfile, clean_restart. Remove incdir. * gdb.threads/multi-create.exp: Use standard_testfile, clean_restart. * gdb.threads/no-unwaited-for-left.exp: Use standard_testfile. * gdb.threads/non-ldr-exc-1.exp: Use standard_testfile. * gdb.threads/non-ldr-exc-2.exp: Use standard_testfile. * gdb.threads/non-ldr-exc-3.exp: Use standard_testfile. * gdb.threads/non-ldr-exc-4.exp: Use standard_testfile. * gdb.threads/pending-step.exp: Use standard_testfile, clean_restart. Remove incdir. * gdb.threads/print-threads.exp: Use standard_testfile, clean_restart. Remove incdir. * gdb.threads/pthread_cond_wait.exp: Use standard_testfile, clean_restart. Remove incdir. * gdb.threads/pthreads.exp: Use standard_testfile, clean_restart. Remove incdir. * gdb.threads/schedlock.exp: Use standard_testfile. Remove incdir. * gdb.threads/sigthread.exp: Use standard_testfile, clean_restart. * gdb.threads/staticthreads.exp: Use standard_testfile, clean_restart. Remove incdir. * gdb.threads/switch-threads.exp: Use standard_testfile, clean_restart. Remove incdir. * gdb.threads/thread-execl.exp: Use standard_testfile, clean_restart. Remove incdir. * gdb.threads/thread-find.exp: Use standard_testfile, clean_restart. * gdb.threads/thread-specific.exp: Use standard_testfile, clean_restart. Remove incdir. * gdb.threads/thread-unwindonsignal.exp: Use standard_testfile, clean_restart. Remove incdir. * gdb.threads/thread_check.exp: Use standard_testfile, clean_restart. Remove incdir. * gdb.threads/thread_events.exp: Use standard_testfile. Remove incdir. * gdb.threads/threadapply.exp: Use standard_testfile, clean_restart. Remove incdir. * gdb.threads/threxit-hop-specific.exp: Use standard_testfile, clean_restart. Remove incdir. * gdb.threads/tls-nodebug.exp: Use standard_testfile, clean_restart. * gdb.threads/tls-shared.exp: Use standard_testfile, clean_restart, standard_output_file. * gdb.threads/tls-var.exp: Use standard_testfile, standard_output_file. * gdb.threads/tls.exp: Use standard_testfile, clean_restart. Remove incdir. * gdb.threads/watchthreads-reorder.exp: Use standard_testfile. * gdb.threads/watchthreads.exp: Use standard_testfile. Remove incdir. * gdb.threads/watchthreads2.exp: Use standard_testfile, clean_restart. Remove incdir.
This commit is contained in:
parent
497a5eb039
commit
0efbbabc9c
@ -1,3 +1,87 @@
|
||||
2012-06-26 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* gdb.threads/watchpoint-fork.exp (test): Use
|
||||
standard_output_file. Don't declare objdir.
|
||||
* gdb.threads/attach-into-signal.exp: Use standard_testfile,
|
||||
standard_output_file.
|
||||
* gdb.threads/attach-stopped.exp: Use standard_testfile.
|
||||
* gdb.threads/bp_in_thread.exp: Use standard_testfile,
|
||||
clean_restart. Remove incdir.
|
||||
* gdb.threads/corethreads.exp: Use standard_testfile.
|
||||
* gdb.threads/execl.exp: Use standard_testfile,
|
||||
standard_output_file, clean_restart.
|
||||
* gdb.threads/fork-child-threads.exp: Use standard_testfile,
|
||||
clean_restart.
|
||||
* gdb.threads/fork-thread-pending.exp: Use standard_testfile,
|
||||
clean_restart.
|
||||
* gdb.threads/gcore-thread.exp: Use standard_testfile. Remove
|
||||
incdir.
|
||||
* gdb.threads/hand-call-in-threads.exp: Use standard_testfile,
|
||||
clean_restart. Remove incdir.
|
||||
* gdb.threads/ia64-sigill.exp: Use standard_testfile.
|
||||
* gdb.threads/interrupted-hand-call.exp: Use standard_testfile,
|
||||
clean_restart. Remove incdir.
|
||||
* gdb.threads/killed.exp: Use standard_testfile, clean_restart.
|
||||
Remove incdir.
|
||||
* gdb.threads/leader-exit.exp: Use standard_testfile.
|
||||
* gdb.threads/linux-dp.exp: Use standard_testfile, clean_restart.
|
||||
* gdb.threads/local-watch-wrong-thread.exp: Use standard_testfile,
|
||||
clean_restart.
|
||||
* gdb.threads/manythreads.exp: Use standard_testfile,
|
||||
clean_restart. Remove incdir.
|
||||
* gdb.threads/multi-create.exp: Use standard_testfile,
|
||||
clean_restart.
|
||||
* gdb.threads/no-unwaited-for-left.exp: Use standard_testfile.
|
||||
* gdb.threads/non-ldr-exc-1.exp: Use standard_testfile.
|
||||
* gdb.threads/non-ldr-exc-2.exp: Use standard_testfile.
|
||||
* gdb.threads/non-ldr-exc-3.exp: Use standard_testfile.
|
||||
* gdb.threads/non-ldr-exc-4.exp: Use standard_testfile.
|
||||
* gdb.threads/pending-step.exp: Use standard_testfile,
|
||||
clean_restart. Remove incdir.
|
||||
* gdb.threads/print-threads.exp: Use standard_testfile,
|
||||
clean_restart. Remove incdir.
|
||||
* gdb.threads/pthread_cond_wait.exp: Use standard_testfile,
|
||||
clean_restart. Remove incdir.
|
||||
* gdb.threads/pthreads.exp: Use standard_testfile, clean_restart.
|
||||
Remove incdir.
|
||||
* gdb.threads/schedlock.exp: Use standard_testfile. Remove
|
||||
incdir.
|
||||
* gdb.threads/sigthread.exp: Use standard_testfile,
|
||||
clean_restart.
|
||||
* gdb.threads/staticthreads.exp: Use standard_testfile,
|
||||
clean_restart. Remove incdir.
|
||||
* gdb.threads/switch-threads.exp: Use standard_testfile,
|
||||
clean_restart. Remove incdir.
|
||||
* gdb.threads/thread-execl.exp: Use standard_testfile,
|
||||
clean_restart. Remove incdir.
|
||||
* gdb.threads/thread-find.exp: Use standard_testfile,
|
||||
clean_restart.
|
||||
* gdb.threads/thread-specific.exp: Use standard_testfile,
|
||||
clean_restart. Remove incdir.
|
||||
* gdb.threads/thread-unwindonsignal.exp: Use standard_testfile,
|
||||
clean_restart. Remove incdir.
|
||||
* gdb.threads/thread_check.exp: Use standard_testfile,
|
||||
clean_restart. Remove incdir.
|
||||
* gdb.threads/thread_events.exp: Use standard_testfile. Remove
|
||||
incdir.
|
||||
* gdb.threads/threadapply.exp: Use standard_testfile,
|
||||
clean_restart. Remove incdir.
|
||||
* gdb.threads/threxit-hop-specific.exp: Use standard_testfile,
|
||||
clean_restart. Remove incdir.
|
||||
* gdb.threads/tls-nodebug.exp: Use standard_testfile,
|
||||
clean_restart.
|
||||
* gdb.threads/tls-shared.exp: Use standard_testfile,
|
||||
clean_restart, standard_output_file.
|
||||
* gdb.threads/tls-var.exp: Use standard_testfile,
|
||||
standard_output_file.
|
||||
* gdb.threads/tls.exp: Use standard_testfile, clean_restart.
|
||||
Remove incdir.
|
||||
* gdb.threads/watchthreads-reorder.exp: Use standard_testfile.
|
||||
* gdb.threads/watchthreads.exp: Use standard_testfile. Remove
|
||||
incdir.
|
||||
* gdb.threads/watchthreads2.exp: Use standard_testfile,
|
||||
clean_restart. Remove incdir.
|
||||
|
||||
2012-06-26 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* gdb.trace/actions.exp: Use standard_testfile.
|
||||
|
@ -22,29 +22,21 @@ if { ![isnative] || [is_remote host] || [target_info exists use_gdb_stub]
|
||||
continue
|
||||
}
|
||||
|
||||
set testfile "attach-into-signal"
|
||||
set srcfile ${testfile}.c
|
||||
standard_testfile
|
||||
set executable_nothr ${testfile}-nothr
|
||||
set executable_thr ${testfile}-thr
|
||||
|
||||
remote_exec build "rm -f ${objdir}/${subdir}/${executable_nothr}"
|
||||
remote_exec build "rm -f ${objdir}/${subdir}/${executable_thr}"
|
||||
# For debugging this test
|
||||
#
|
||||
#log_user 1
|
||||
|
||||
proc corefunc { threadtype executable } {
|
||||
global srcfile
|
||||
global srcdir
|
||||
global objdir
|
||||
global subdir
|
||||
global gdb_prompt
|
||||
|
||||
with_test_prefix "$threadtype" {
|
||||
clean_restart ${executable}
|
||||
|
||||
set binfile ${objdir}/${subdir}/${executable}
|
||||
set escapedbinfile [string_to_regexp ${objdir}/${subdir}/${executable}]
|
||||
set binfile [standard_output_file $executable]
|
||||
set escapedbinfile [string_to_regexp ${binfile}]
|
||||
|
||||
if [get_compiler_info] {
|
||||
return -1
|
||||
@ -183,7 +175,7 @@ corefunc nonthreaded ${executable_nothr}
|
||||
|
||||
# build the test case also with threads
|
||||
#
|
||||
if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${objdir}/${subdir}/${executable_thr}" executable {debug additional_flags=-DUSE_THREADS}] != "" } {
|
||||
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
|
||||
}
|
||||
|
@ -23,10 +23,8 @@ if { ![isnative] || [is_remote host] || [target_info exists use_gdb_stub]
|
||||
continue
|
||||
}
|
||||
|
||||
set testfile "attach-stopped"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
set escapedbinfile [string_to_regexp ${objdir}/${subdir}/${testfile}]
|
||||
standard_testfile
|
||||
set escapedbinfile [string_to_regexp $binfile]
|
||||
|
||||
#execute_anywhere "rm -f ${binfile}"
|
||||
remote_exec build "rm -f ${binfile}"
|
||||
|
@ -18,18 +18,14 @@
|
||||
# GDB reported a SIGTRAP signal in a random thread when hitting
|
||||
# a breakpoint.
|
||||
|
||||
set testfile "bp_in_thread"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile
|
||||
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
|
||||
return -1
|
||||
}
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
clean_restart $binfile
|
||||
|
||||
runto_main
|
||||
|
||||
gdb_test "break noreturn" \
|
||||
|
@ -19,10 +19,8 @@ if {![isnative] || ![istarget "*-*-linux*"]} {
|
||||
return
|
||||
}
|
||||
|
||||
set testfile "corethreads"
|
||||
set srcfile ${testfile}.c
|
||||
standard_testfile
|
||||
set executable ${testfile}
|
||||
set binfile ${objdir}/${subdir}/${executable}
|
||||
if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
untested ${testfile}.exp
|
||||
return -1
|
||||
|
@ -20,9 +20,7 @@ if { [is_remote target] } then {
|
||||
}
|
||||
|
||||
# Original image, loads a thread library.
|
||||
set testfile "execl"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile
|
||||
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
return -1
|
||||
@ -31,16 +29,13 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
|
||||
# New image, that does not load a thread library.
|
||||
set testfile1 "execl1"
|
||||
set srcfile1 ${testfile1}.c
|
||||
set binfile1 ${objdir}/${subdir}/${testfile1}
|
||||
set binfile1 [standard_output_file ${testfile1}]
|
||||
|
||||
if {[gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile1}" executable {debug}] != "" } {
|
||||
return -1
|
||||
}
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
|
||||
runto_main
|
||||
|
||||
|
@ -22,19 +22,14 @@ if { [is_remote target] || ![isnative] } then {
|
||||
return 0
|
||||
}
|
||||
|
||||
set testfile fork-child-threads
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile
|
||||
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
return -1
|
||||
}
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
clean_restart ${binfile}
|
||||
|
||||
gdb_load ${binfile}
|
||||
if ![runto_main] then {
|
||||
fail "Can't run to main"
|
||||
return 0
|
||||
|
@ -25,19 +25,14 @@ if { ! [istarget "*-*-linux*"] } {
|
||||
return 0
|
||||
}
|
||||
|
||||
set testfile fork-thread-pending
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile
|
||||
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
return -1
|
||||
}
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
clean_restart ${binfile}
|
||||
|
||||
gdb_load ${binfile}
|
||||
if ![runto_main] then {
|
||||
fail "Can't run to main"
|
||||
return 0
|
||||
|
@ -17,12 +17,10 @@
|
||||
# This is a test for the gdb command "generate-core-file".
|
||||
|
||||
# Single-threaded test case
|
||||
set testfile "gcore-thread"
|
||||
set srcfile pthreads.c
|
||||
set objfile ${objdir}/${subdir}/${testfile}.o
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
set corefile ${objdir}/${subdir}/${testfile}.test
|
||||
set core0file ${objdir}/${subdir}/${testfile}0.test
|
||||
standard_testfile pthreads.c
|
||||
set objfile $binfile.o
|
||||
set corefile $binfile.test
|
||||
set core0file ${binfile}0.test
|
||||
|
||||
if [istarget "*-*-linux"] then {
|
||||
set target_cflags "-D_MIT_POSIX_THREADS"
|
||||
@ -35,7 +33,7 @@ if [istarget "*-*-linux"] then {
|
||||
# libpthread, therefore libthread_db will not fail as expected
|
||||
# on the test `zeroed-threads cannot be listed'.
|
||||
|
||||
set opts [list debug "incdir=${objdir}"]
|
||||
set opts [list debug]
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${objfile}" object $opts] != ""
|
||||
|| ([gdb_compile_pthreads "${objfile}" "${binfile}" executable [concat $opts {additional_flags=-Wl,-z,norelro}] ] != ""
|
||||
&& [gdb_compile_pthreads "${objfile}" "${binfile}" executable $opts] != "") } {
|
||||
|
@ -18,11 +18,9 @@
|
||||
|
||||
set NR_THREADS 4
|
||||
|
||||
set testfile "hand-call-in-threads"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile
|
||||
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}" "additional_flags=-DNR_THREADS=$NR_THREADS"]] != "" } {
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-DNR_THREADS=$NR_THREADS"]] != "" } {
|
||||
return -1
|
||||
}
|
||||
|
||||
@ -51,10 +49,7 @@ proc get_dummy_frame_number { } {
|
||||
return ""
|
||||
}
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
|
||||
if { ![runto_main] } {
|
||||
fail "Can't run to main"
|
||||
|
@ -20,9 +20,7 @@
|
||||
# breakpoint has been already deleted. moribund locations are not active in
|
||||
# the default all-stop mode.
|
||||
|
||||
set testfile "ia64-sigill"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" ${binfile} executable [list debug additional_flags=-lrt]] != "" } {
|
||||
return -1
|
||||
}
|
||||
|
@ -19,11 +19,9 @@
|
||||
|
||||
set NR_THREADS 4
|
||||
|
||||
set testfile "interrupted-hand-call"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile
|
||||
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}" "additional_flags=-DNR_THREADS=$NR_THREADS"]] != "" } {
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-DNR_THREADS=$NR_THREADS"]] != "" } {
|
||||
return -1
|
||||
}
|
||||
|
||||
@ -35,10 +33,7 @@ if [target_info exists gdb,cannot_call_functions] {
|
||||
continue
|
||||
}
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
|
||||
if { ![runto_main] } {
|
||||
fail "Can't run to main"
|
||||
|
@ -55,18 +55,14 @@
|
||||
# $
|
||||
|
||||
|
||||
set testfile "killed"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile
|
||||
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
|
||||
gdb_run_cmd
|
||||
gdb_expect {
|
||||
|
@ -15,10 +15,8 @@
|
||||
|
||||
# Exit of the thread group leader should not break GDB.
|
||||
|
||||
set testfile "leader-exit"
|
||||
set srcfile ${testfile}.c
|
||||
standard_testfile
|
||||
set executable ${testfile}
|
||||
set binfile ${objdir}/${subdir}/${executable}
|
||||
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
return -1
|
||||
|
@ -39,16 +39,12 @@ if ![istarget *-*-linux-gnu*] then {
|
||||
return
|
||||
}
|
||||
|
||||
set testfile "linux-dp"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != ""} {
|
||||
return -1
|
||||
}
|
||||
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
gdb_test_no_output "set print sevenbit-strings"
|
||||
runto_main
|
||||
|
||||
|
@ -23,19 +23,14 @@ if {[skip_hw_watchpoint_multi_tests]} {
|
||||
return 0
|
||||
}
|
||||
|
||||
set testfile "local-watch-wrong-thread"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile
|
||||
if {[gdb_compile_pthreads \
|
||||
"${srcdir}/${subdir}/${srcfile}" \
|
||||
"${binfile}" executable {debug} ] != "" } {
|
||||
return -1
|
||||
}
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
|
||||
gdb_test_no_output "set can-use-hw-watchpoints 1" ""
|
||||
|
||||
|
@ -17,17 +17,13 @@
|
||||
# This file was written by Jeff Johnston. (jjohnstn@redhat.com)
|
||||
|
||||
|
||||
set testfile "manythreads"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile
|
||||
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
|
||||
return -1
|
||||
}
|
||||
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
gdb_test_no_output "set print sevenbit-strings"
|
||||
runto_main
|
||||
|
||||
|
@ -14,18 +14,14 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set testfile "multi-create"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile
|
||||
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
|
||||
executable {debug}] != "" } {
|
||||
return -1
|
||||
}
|
||||
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
runto_main
|
||||
|
||||
# Run to the beginning of create_function several times. Make sure
|
||||
|
@ -16,10 +16,8 @@
|
||||
# Exit of a thread when there are other threads in the inferior should
|
||||
# not hang GDB.
|
||||
|
||||
set testfile "no-unwaited-for-left"
|
||||
set srcfile ${testfile}.c
|
||||
standard_testfile
|
||||
set executable ${testfile}
|
||||
set binfile ${objdir}/${subdir}/${executable}
|
||||
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
return -1
|
||||
|
@ -21,10 +21,8 @@ if { [is_remote target] } then {
|
||||
continue
|
||||
}
|
||||
|
||||
set testfile "non-ldr-exc-1"
|
||||
set srcfile ${testfile}.c
|
||||
standard_testfile
|
||||
set executable ${testfile}
|
||||
set binfile ${objdir}/${subdir}/${executable}
|
||||
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
return -1
|
||||
|
@ -22,10 +22,8 @@ if { [is_remote target] } then {
|
||||
continue
|
||||
}
|
||||
|
||||
set testfile "non-ldr-exc-2"
|
||||
set srcfile ${testfile}.c
|
||||
standard_testfile
|
||||
set executable ${testfile}
|
||||
set binfile ${objdir}/${subdir}/${executable}
|
||||
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
return -1
|
||||
|
@ -24,10 +24,8 @@ if { [is_remote target] } then {
|
||||
continue
|
||||
}
|
||||
|
||||
set testfile "non-ldr-exc-3"
|
||||
set srcfile ${testfile}.c
|
||||
standard_testfile
|
||||
set executable ${testfile}
|
||||
set binfile ${objdir}/${subdir}/${executable}
|
||||
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
return -1
|
||||
|
@ -23,10 +23,8 @@ if { [is_remote target] } then {
|
||||
continue
|
||||
}
|
||||
|
||||
set testfile "non-ldr-exc-4"
|
||||
set srcfile ${testfile}.c
|
||||
standard_testfile
|
||||
set executable ${testfile}
|
||||
set binfile ${objdir}/${subdir}/${executable}
|
||||
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
return -1
|
||||
|
@ -48,20 +48,13 @@
|
||||
# continued in step 5). Neither does this SIGTRAP correspond to a
|
||||
# breakpoint hit. GDB reports to the user a spurious SIGTRAP.
|
||||
|
||||
set testfile "pending-step"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile
|
||||
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
|
||||
return -1
|
||||
}
|
||||
|
||||
# Start with a fresh gdb.
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
|
||||
if ![runto_main] then {
|
||||
fail "Can't run to main"
|
||||
|
@ -21,26 +21,19 @@
|
||||
# handling for thread exit.
|
||||
|
||||
|
||||
set testfile "print-threads"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile
|
||||
|
||||
# regexp for "horizontal" text (i.e. doesn't include newline or
|
||||
# carriage return)
|
||||
set horiz "\[^\n\r\]*"
|
||||
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
|
||||
return -1
|
||||
}
|
||||
|
||||
# Now we can proceed with the real testing.
|
||||
|
||||
# Start with a fresh gdb.
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
|
||||
gdb_test_no_output "set print sevenbit-strings"
|
||||
#gdb_test_no_output "set print address off"
|
||||
|
@ -19,18 +19,13 @@
|
||||
# This file verifies that GDB is able to compute a backtrace for a thread
|
||||
# being blocked on a call to pthread_cond_wait().
|
||||
|
||||
set testfile "pthread_cond_wait"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile
|
||||
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
|
||||
return -1
|
||||
}
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
runto_main
|
||||
|
||||
gdb_test "break break_me" \
|
||||
|
@ -17,9 +17,7 @@
|
||||
# This file was written by Fred Fish. (fnf@cygnus.com)
|
||||
|
||||
|
||||
set testfile "pthreads"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile
|
||||
|
||||
# regexp for "horizontal" text (i.e. doesn't include newline or
|
||||
# carriage return)
|
||||
@ -31,17 +29,11 @@ if [istarget "*-*-linux"] then {
|
||||
set target_cflags ""
|
||||
}
|
||||
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
||||
# Start with a fresh gdb.
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
|
||||
gdb_test_no_output "set print sevenbit-strings"
|
||||
#gdb_test_no_output "set print address off"
|
||||
|
@ -20,14 +20,12 @@
|
||||
# This test covers the various forms of "set scheduler-locking".
|
||||
|
||||
|
||||
set testfile "schedlock"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile
|
||||
|
||||
# The number of threads, including the main thread.
|
||||
set NUM 2
|
||||
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
@ -14,19 +14,14 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
set testfile sigthread
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile
|
||||
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
|
||||
executable { debug }] != "" } {
|
||||
return -1
|
||||
}
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
|
||||
if ![runto_main] then {
|
||||
fail "Can't run to main"
|
||||
|
@ -19,21 +19,17 @@
|
||||
# Hat.
|
||||
|
||||
|
||||
set testfile "staticthreads"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile
|
||||
set static_flag "-static"
|
||||
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
|
||||
executable \
|
||||
[list debug "incdir=${objdir}" "additional_flags=${static_flag}" \
|
||||
[list debug "additional_flags=${static_flag}" \
|
||||
]] != "" } {
|
||||
return -1
|
||||
}
|
||||
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
gdb_test_no_output "set print sevenbit-strings"
|
||||
|
||||
|
||||
|
@ -23,18 +23,13 @@
|
||||
# TODO: we should also test explicitly changing threads with the "thread"
|
||||
# command.
|
||||
|
||||
set testfile "switch-threads"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile
|
||||
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
|
||||
return -1
|
||||
}
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
|
||||
runto_main
|
||||
|
||||
|
@ -21,21 +21,14 @@ if { [is_remote target] } {
|
||||
return 0
|
||||
}
|
||||
|
||||
set testfile "thread-execl"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile
|
||||
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
|
||||
executable [list debug "incdir=${objdir}"]] != "" } {
|
||||
executable debug] != "" } {
|
||||
return -1
|
||||
}
|
||||
|
||||
# Start with a fresh gdb.
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
|
||||
runto_main
|
||||
|
||||
|
@ -16,16 +16,12 @@
|
||||
# Please email any bugs, comments, and/or additions to this file to:
|
||||
# bug-gdb@gnu.org
|
||||
|
||||
set testfile "linux-dp"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile linux-dp.c
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != ""} {
|
||||
return -1
|
||||
}
|
||||
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
gdb_test_no_output "set print sevenbit-strings"
|
||||
runto_main
|
||||
|
||||
|
@ -18,11 +18,9 @@
|
||||
# thread-specific breakpoint inserted for several threads.
|
||||
|
||||
|
||||
set testfile "thread-specific"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile
|
||||
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
|
||||
return -1
|
||||
}
|
||||
|
||||
@ -63,13 +61,7 @@ proc get_thread_list { } {
|
||||
return $thr_list
|
||||
}
|
||||
|
||||
# Start with a fresh gdb.
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
|
||||
gdb_test_no_output "set print sevenbit-strings"
|
||||
gdb_test_no_output "set width 0"
|
||||
|
@ -18,11 +18,9 @@
|
||||
|
||||
set NR_THREADS 4
|
||||
|
||||
set testfile "interrupted-hand-call"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile interrupted-hand-call.c
|
||||
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}" "additional_flags=-DNR_THREADS=$NR_THREADS"]] != "" } {
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-DNR_THREADS=$NR_THREADS"]] != "" } {
|
||||
return -1
|
||||
}
|
||||
|
||||
@ -34,10 +32,7 @@ if [target_info exists gdb,cannot_call_functions] {
|
||||
continue
|
||||
}
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
|
||||
if { ![runto_main] } {
|
||||
fail "Can't run to main"
|
||||
|
@ -32,18 +32,14 @@
|
||||
# - exit gdb.
|
||||
|
||||
|
||||
set testfile "thread_check"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile
|
||||
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
|
||||
if ![runto_main] then {
|
||||
fail "Can't run to main"
|
||||
|
@ -34,11 +34,9 @@ if [is_remote target] then {
|
||||
}
|
||||
|
||||
|
||||
set testfile "thread_events"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile
|
||||
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
@ -20,17 +20,12 @@
|
||||
# and will continue for each thread even though an error may occur in
|
||||
# backtracing one of the threads.
|
||||
|
||||
set testfile "threadapply"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
|
||||
standard_testfile
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
|
||||
return -1
|
||||
}
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
|
||||
#
|
||||
# Run to `main' where we begin our tests.
|
||||
|
@ -16,22 +16,14 @@
|
||||
# Test that GDB doesn't get stuck when thread hoping over a thread
|
||||
# specific breakpoint when the selected thread has gone away.
|
||||
|
||||
set testfile "threxit-hop-specific"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile
|
||||
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
|
||||
executable [list debug "incdir=${objdir}"]] != "" } {
|
||||
executable debug] != "" } {
|
||||
return -1
|
||||
}
|
||||
|
||||
# Start with a fresh gdb.
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
|
||||
runto_main
|
||||
|
||||
|
@ -14,9 +14,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
set testfile tls-nodebug
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile
|
||||
|
||||
if [istarget "*-*-linux"] then {
|
||||
set target_cflags "-D_MIT_POSIX_THREADS"
|
||||
@ -28,11 +26,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
|
||||
return -1
|
||||
}
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
if ![runto_main] then {
|
||||
fail "Can't run to main"
|
||||
return 0
|
||||
|
@ -16,12 +16,10 @@
|
||||
# tls-shared.exp -- Expect script to test thread local storage in gdb, with
|
||||
# shared libraries.
|
||||
|
||||
set testfile tls-main
|
||||
standard_testfile tls-main.c
|
||||
set libfile tls-shared
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
set srcfile_lib ${libfile}.c
|
||||
set binfile_lib ${objdir}/${subdir}/${libfile}.so
|
||||
set binfile_lib [standard_output_file ${libfile}.so]
|
||||
|
||||
remote_exec build "rm -f ${binfile}"
|
||||
|
||||
@ -37,10 +35,7 @@ if { [gdb_compile_shlib_pthreads ${srcdir}/${subdir}/${srcfile_lib} ${binfile_li
|
||||
}
|
||||
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
gdb_load_shlibs ${binfile_lib}
|
||||
|
||||
if ![runto_main] then {
|
||||
@ -53,7 +48,7 @@ gdb_test "print i_tls" "2" "print thread local storage variable"
|
||||
gdb_test "ptype i_tls" "int" "ptype of thread local storage variable"
|
||||
|
||||
gdb_test "info address i_tls" \
|
||||
"Symbol \\\"i_tls\\\" is a thread-local variable at offset 0x0 in the thread-local storage for .*tls-main.." \
|
||||
"Symbol \\\"i_tls\\\" is a thread-local variable at offset 0x0 in the thread-local storage for .*tls-shared.." \
|
||||
"print storage info for thread local storage variable"
|
||||
|
||||
set line_number [gdb_get_line_number "break here to check result"]
|
||||
|
@ -13,13 +13,11 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set testfile tls-var
|
||||
set srcfile ${testfile}.c
|
||||
standard_testfile
|
||||
set srcmainfile ${testfile}-main.c
|
||||
set objfile ${objdir}/${subdir}/${testfile}.o
|
||||
set objmainfile ${objdir}/${subdir}/${testfile}-main.o
|
||||
set objfile [standard_output_file ${testfile}.o]
|
||||
set objmainfile [standard_output_file ${testfile}-main.o]
|
||||
set executable ${testfile}
|
||||
set binfile ${objdir}/${subdir}/${executable}
|
||||
|
||||
if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${objfile} object {debug}] != ""
|
||||
|| [gdb_compile ${srcdir}/${subdir}/${srcmainfile} ${objmainfile} object {}] != ""
|
||||
|
@ -14,11 +14,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
set testfile tls
|
||||
set testfile2 tls2
|
||||
set srcfile ${testfile}.c
|
||||
set srcfile2 ${testfile2}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile tls.c tls2.c
|
||||
|
||||
if [istarget "*-*-linux"] then {
|
||||
set target_cflags "-D_MIT_POSIX_THREADS"
|
||||
@ -26,7 +22,7 @@ if [istarget "*-*-linux"] then {
|
||||
set target_cflags ""
|
||||
}
|
||||
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile} ${srcdir}/${subdir}/${srcfile2}" "${binfile}" executable [list c++ debug "incdir=${objdir}"]] != "" } {
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile} ${srcdir}/${subdir}/${srcfile2}" "${binfile}" executable [list c++ debug]] != "" } {
|
||||
return -1
|
||||
}
|
||||
|
||||
@ -142,11 +138,7 @@ proc check_thread_stack {number spin_threads spin_threads_level} {
|
||||
}
|
||||
}
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
if ![runto_main] then {
|
||||
fail "Can't run to main"
|
||||
return 0
|
||||
|
@ -23,7 +23,7 @@ if [is_remote target] {
|
||||
}
|
||||
|
||||
proc test {type symbol} { with_test_prefix "$type" {
|
||||
global testfile objdir subdir srcdir gdb_prompt
|
||||
global testfile subdir srcdir gdb_prompt
|
||||
|
||||
set srcfile_type ${srcdir}/${subdir}/${testfile}-${type}.c
|
||||
|
||||
@ -31,11 +31,13 @@ proc test {type symbol} { with_test_prefix "$type" {
|
||||
|
||||
with_test_prefix "singlethreaded" {
|
||||
set executable ${testfile}-${type}-st
|
||||
set srcfile_main ${srcdir}/${subdir}/${testfile}-st.c
|
||||
if { [gdb_compile "${srcfile_main} ${srcfile_type}" ${objdir}/${subdir}/${executable} executable [list debug additional_flags=-D$symbol]] != "" } {
|
||||
untested ${testfile}.exp
|
||||
return
|
||||
set srcfile_main ${testfile}-st.c
|
||||
if {[build_executable $testfile.exp $executable \
|
||||
[list $srcfile_main ${testfile}-${type}.c] \
|
||||
[list debug additional_flags=-D$symbol]] == -1} {
|
||||
return -1
|
||||
}
|
||||
|
||||
clean_restart $executable
|
||||
|
||||
if [target_info exists gdb,no_hardware_watchpoints] {
|
||||
@ -90,7 +92,7 @@ proc test {type symbol} { with_test_prefix "$type" {
|
||||
with_test_prefix "multithreaded" {
|
||||
set executable ${testfile}-${type}-mt
|
||||
set srcfile_main ${srcdir}/${subdir}/${testfile}-mt.c
|
||||
if { [gdb_compile_pthreads "${srcfile_main} ${srcfile_type}" ${objdir}/${subdir}/${executable} executable [list debug "additional_flags=-D$symbol -DTHREAD"]] != "" } {
|
||||
if { [gdb_compile_pthreads "${srcfile_main} ${srcfile_type}" [standard_output_file ${executable}] executable [list debug "additional_flags=-D$symbol -DTHREAD"]] != "" } {
|
||||
untested ${testfile}.exp
|
||||
return
|
||||
}
|
||||
|
@ -31,9 +31,7 @@ if {[skip_hw_watchpoint_access_tests]
|
||||
return 0
|
||||
}
|
||||
|
||||
set testfile "watchthreads-reorder"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" ${binfile} executable [list debug additional_flags=-lrt]] != "" } {
|
||||
return -1
|
||||
}
|
||||
|
@ -28,10 +28,8 @@ proc target_no_stopped_data { } {
|
||||
return [istarget s390*-*-*]
|
||||
}
|
||||
|
||||
set testfile "watchthreads"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
|
||||
standard_testfile
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
@ -28,17 +28,12 @@ if {[skip_hw_watchpoint_tests]} {
|
||||
return 0
|
||||
}
|
||||
|
||||
set testfile "watchthreads2"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}" "additional_flags=-DNR_THREADS=$NR_THREADS -DX_INCR_COUNT=$X_INCR_COUNT"]] != "" } {
|
||||
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
|
||||
}
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
|
||||
gdb_test_no_output "set can-use-hw-watchpoints 1" ""
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user