* gdb.threads/pthreads.exp: Enable on non-native configurations.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.mi / gdb669.exp
1 # Copyright 2002, 2003, 2004, 2007, 2008, 2009, 2010, 2011
2 # Free Software Foundation, Inc.
3
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16
17 # This file checks for the bug gdb/669, where the console
18 # command "info threads" and the MI command "-thread-list-ids"
19 # return different threads in the system.
20
21 load_lib mi-support.exp
22 set MIFLAGS "-i=mi"
23
24 gdb_exit
25 if {[mi_gdb_start]} {
26 continue
27 }
28
29 #
30 # Start here
31 #
32 set testfile "pthreads"
33 set srcfile "$testfile.c"
34 set binfile "$objdir/$subdir/gdb669-$testfile"
35
36 set options [list debug incdir=$objdir]
37 if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $options] != "" } {
38 return -1
39 }
40
41 mi_run_to_main
42 check_mi_and_console_threads "at main"
43
44 for {set i 0} {$i < 4} {incr i} {
45 mi_next "next, try $i"
46 check_mi_and_console_threads "try $i"
47 }
48
49 mi_gdb_exit
50
This page took 0.032501 seconds and 5 git commands to generate.