2011-10-28 Pedro Alves <pedro@codesourcery.com>
[binutils-gdb.git] / gdb / testsuite / gdb.threads / pthreads.exp
index 44e3c4ece3cb7c46a43e06db0b84e354448a5845..cbc4525e3a5e44da19751aa926689b0204b97bef 100644 (file)
@@ -1,5 +1,5 @@
 # Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2007, 2008,
-# 2009, 2010 Free Software Foundation, Inc.
+# 2009, 2010, 2011 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
@@ -21,11 +21,6 @@ if $tracelevel then {
 }
 
 
-# This only works with native configurations
-if ![isnative] then {
-    return
-}
-
 set testfile "pthreads"
 set srcfile ${testfile}.c
 set binfile ${objdir}/${subdir}/${testfile}
@@ -61,7 +56,7 @@ gdb_test_no_output "set width 0"
 # 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 all_threads_running {} {
@@ -82,7 +77,7 @@ proc all_threads_running {} {
     # been called 15 times.  This should be plenty of time to allow
     # every thread to run at least once, since each thread sleeps for
     # one second between calls to common_routine.
-    gdb_test "tbreak common_routine if hits >= 15" ""
+    gdb_test "tbreak common_routine if hits >= 15" ".*"
 
     # Start all the threads running again and wait for the inferior
     # to stop.  Since no other breakpoints are set at this time
@@ -230,7 +225,7 @@ proc check_control_c {} {
            return 1;
        }
     }
-    gdb_test "bt" ""
+    gdb_test "bt" ".*"
 
     # Verify that all threads can be run again after a ^C stop.
     if [all_threads_running] then {
@@ -269,16 +264,16 @@ proc check_backtraces {} {
            "set break at common_routine in thread 2"
 
     gdb_test_multiple "continue" "continue to bkpt at common_routine in thread 2" {
-       -re "Breakpoint .* common_routine \\(arg=2\\).*" {
+       -re "Breakpoint .* common_routine \\(arg=2\\).*$gdb_prompt $" {
            pass "continue to bkpt at common_routine in thread 2"
            gdb_test "backtrace" \
                "#0.*common_routine \\(arg=2\\).*#1.*thread2.*" \
                "backtrace from thread 2 bkpt in common_routine"
        }
-       -re "Breakpoint .* common_routine \\(arg=0\\).*" {
+       -re "Breakpoint .* common_routine \\(arg=0\\).*$gdb_prompt $" {
            fail "continue to bkpt at common_routine in thread 2 (arg=0)"
        }
-       -re "Breakpoint .* common_routine \\(arg=1\\).*" {
+       -re "Breakpoint .* common_routine \\(arg=1\\).*$gdb_prompt $" {
            fail "continue to bkpt at common_routine in thread 2 (arg=1)"
        }
     }