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