]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/testsuite/gdb.mi/mi-pthreads.exp
Update years in copyright notice for the GDB files.
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.mi / mi-pthreads.exp
index dbb3ece3ffa5d467885a616366b81b76885b190b..8b3d450e9fefb9a856228065338e3ad7a1dade23 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2002, 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+# Copyright 2002-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
 # via these command pathways are properly executed. Console commands
 # executed via MI should use MI output wrappers, MI event handlers, etc.
 
-# This only works with native configurations
-if {![isnative]} {
-  return
-}
-
 load_lib mi-support.exp
 set MIFLAGS "-i=mi"
 
@@ -40,7 +35,7 @@ proc check_mi_thread_command_set {} {
   set thread_list [get_mi_thread_list "in check_mi_thread_command_set"]
   
   mi_gdb_test "-thread-select" \
-    {\^error,msg="mi_cmd_thread_select: USAGE: threadnum."} \
+    {\^error,msg="-thread-select: USAGE: threadnum."} \
     "check_mi_thread_command_set: -thread-select"
 
   mi_gdb_test "-thread-select 123456789" \
@@ -55,16 +50,20 @@ proc check_mi_thread_command_set {} {
       "\\^done,new-thread-id=\"$thread\",frame={.*}(,line=\"(-)?\[0-9\]+\",file=\".*\")?" \
       "check_mi_thread_command_set: -thread-select $thread"
   }
+
+  foreach thread $thread_list {
+      mi_gdb_test "-interpreter-exec console \"thread $thread\"" \
+          ".*\\^done\r\n=thread-selected,id=\"$thread\"" \
+          "check =thread-selected: thread $thread"
+  }
 }
 
 #
 # Start here
 #
-set testfile "pthreads"
-set srcfile "$testfile.c"
-set binfile "$objdir/$subdir/mi-$testfile"
+standard_testfile pthreads.c
 
-set options [list debug incdir=$objdir]
+set options [list debug]
 if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $options] != "" } {
     return -1
 }