Testsuite: Fix compiling of shared libraries with ICC.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.threads / print-threads.exp
index 97c8cf6e9f3d32f7df3302015696844f360d0ad6..1cbec5f086459c277cbd478ccb636f2dea1b931e 100644 (file)
@@ -1,5 +1,4 @@
-# Copyright (C) 1996-1997, 2002-2003, 2007-2012 Free Software
-# Foundation, Inc.
+# Copyright (C) 1996-2016 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
 # It tests miscellaneous actions with multiple threads, including
 # handling for thread exit.
 
-if $tracelevel then {
-       strace $tracelevel
-}
-
 
-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"
@@ -52,11 +40,7 @@ gdb_test_no_output "set width 0"
 
 # We'll need this when we send_gdb a ^C to GDB.  Need to do it before we
 # run the program and gdb starts saving and restoring tty states.
-# On Ultrix, we don't need it and it is really slow (because shell_escape
-# doesn't use vfork).
-if ![istarget "*-*-ultrix*"] then {
-    gdb_test "shell stty intr '^C'" ".*"
-}
+gdb_test "shell stty intr '^C'" ".*"
 
 proc test_all_threads { name kill } {
     global gdb_prompt inferior_exited_re
@@ -88,7 +72,7 @@ proc test_all_threads { name kill } {
                fail "all threads ran once ($name) (total $i threads ran)"
            }
        }
-       -re "Program received signal SIGTRAP.*(Thread \[-0-9a-fx\]* \\(zombie\\)|0x00000000 in ).*$gdb_prompt $" {
+       -re " received signal SIGTRAP.*(Thread \[-0-9a-fx\]* \\(zombie\\)|0x00000000 in ).*$gdb_prompt $" {
            if { $kill == 1 } {
                kfail "gdb/1265" "Running threads ($name) (zombie thread)"
            } else {
This page took 0.030199 seconds and 4 git commands to generate.