Index: gdb/testsuite/gdb.threads/linux-dp.exp |
diff --git a/gdb/testsuite/gdb.threads/linux-dp.exp b/gdb/testsuite/gdb.threads/linux-dp.exp |
index b211aa242b5f2f84e110242feb8234e3f3468c83..ca65d10e67bd76483e5a86940d734cebfb1f4d70 100644 |
--- a/gdb/testsuite/gdb.threads/linux-dp.exp |
+++ b/gdb/testsuite/gdb.threads/linux-dp.exp |
@@ -33,26 +33,18 @@ |
### killing and restarting |
### quitting gracefully |
-if $tracelevel then { |
- strace $tracelevel |
-} |
- |
# This only works with Linux configurations. |
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 |
@@ -343,13 +335,14 @@ proc check_philosopher_stack {thread seen_name} { |
} |
set any_interesting 0 |
+catch {unset seen} |
array set seen {} |
-unset seen |
for {set i 1} {$i <= $nthreads} {incr i} { |
if [check_philosopher_stack $i seen] { |
set any_interesting 1 |
} |
} |
+unset seen |
if {$any_interesting} { |
pass "found an interesting thread" |