]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/testsuite/gdb.threads/linux-dp.exp
Update years in copyright notice for the GDB files.
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.threads / linux-dp.exp
index 6bbdb4589ebfb89a3a1d269c463c4ed4445d0983..522f317114f53d4ce29de86cc61de67eb5a288a7 100644 (file)
@@ -1,5 +1,4 @@
-# Copyright 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-# 2011 Free Software Foundation, Inc.
+# Copyright 1999-2013 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 ### 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
 
@@ -344,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"