aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.threads/threadcrash.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.threads/threadcrash.exp')
-rw-r--r--gdb/testsuite/gdb.threads/threadcrash.exp13
1 files changed, 7 insertions, 6 deletions
diff --git a/gdb/testsuite/gdb.threads/threadcrash.exp b/gdb/testsuite/gdb.threads/threadcrash.exp
index 15d2a20..d57f437 100644
--- a/gdb/testsuite/gdb.threads/threadcrash.exp
+++ b/gdb/testsuite/gdb.threads/threadcrash.exp
@@ -132,8 +132,9 @@ proc do_full_test {} {
set pthread_kill ".*"
}
- for {set i 0} {$i < $thread_count } {incr i} {
- set thread_num [expr [llength $test_list] - $i]
+ set loop_iterations [llength $test_list]
+ for {set i 0} {$i < $loop_iterations } {incr i} {
+ set thread_num [expr {$loop_iterations - $i}]
set type [lindex $test_list $i]
if { $type == 1 } {
@@ -237,7 +238,7 @@ proc_with_prefix test_corefile {} {
proc_with_prefix test_gcore {} {
- clean_restart "$::binfile"
+ clean_restart "$::testfile"
gdb_test "handle SIGUSR1 nostop print pass" \
".*SIGUSR1.*No.*Yes.*Yes.*User defined signal 1" \
@@ -270,12 +271,12 @@ proc_with_prefix test_gcore {} {
standard_testfile
-if [prepare_for_testing "failed to prepare" $testfile $srcfile \
- {debug pthreads}] {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
+ {debug pthreads}]} {
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
gdb_test_no_output "set backtrace limit unlimited"