2009-01-03 06:58:08 +01:00
|
|
|
# Copyright 2002, 2003, 2004, 2007, 2008, 2009 Free Software Foundation, Inc.
|
2002-09-24 21:36:06 +02:00
|
|
|
|
|
|
|
# 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
|
2007-08-23 20:14:19 +02:00
|
|
|
# the Free Software Foundation; either version 3 of the License, or
|
2002-09-24 21:36:06 +02:00
|
|
|
# (at your option) any later version.
|
2007-08-23 20:14:19 +02:00
|
|
|
#
|
2002-09-24 21:36:06 +02:00
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
2007-08-23 20:14:19 +02:00
|
|
|
#
|
2002-09-24 21:36:06 +02:00
|
|
|
# You should have received a copy of the GNU General Public License
|
2007-08-23 20:14:19 +02:00
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2002-09-24 21:36:06 +02:00
|
|
|
|
|
|
|
# This file checks for the bug gdb/669, where the console
|
|
|
|
# command "info threads" and the MI command "-thread-list-ids"
|
|
|
|
# return different threads in the system.
|
|
|
|
|
|
|
|
# This only works with native configurations
|
|
|
|
if {![isnative]} {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
load_lib mi-support.exp
|
|
|
|
set MIFLAGS "-i=mi"
|
|
|
|
|
|
|
|
gdb_exit
|
|
|
|
if {[mi_gdb_start]} {
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
|
|
|
|
#
|
|
|
|
# Start here
|
|
|
|
#
|
|
|
|
set testfile "pthreads"
|
|
|
|
set srcfile "$testfile.c"
|
2004-01-13 18:08:03 +01:00
|
|
|
set binfile "$objdir/$subdir/gdb669-$testfile"
|
2002-09-24 21:36:06 +02:00
|
|
|
|
* configure.in: Call AC_CONFIG_HEADER. Don't call
AC_CONFIG_SUBDIRS on gdb.arch, gdb.asm, gdb.base gdb.c++ gdb.java,
gdb.disasm, gdb.mi, gdb.threads and gdb.trace. Call
AC_CHECK_HEADERS on pthread.h. Put Makefiles in the
aforementioned directories in the AC_OUPUT call.
* config.hin: New file.
* gdb.mi/gdb669.exp, gdb.mi/mi-pthreads.exp,
gdb.mi/mi1-pthreads.exp, gdb.threads/gcore-thread.exp,
gdb.threads/killed.exp, gdb.threads/print-threads.exp,
gdb.threads/pthreads.exp, gdb.threads/schedlock.exp: Make sure we
pass -I$objdir instead of -I$objdir/$subdir in compilation.
* gdb.arch/configure.in, gdb.arch/configure, gdb.asm/configure.in,
gdb.asm/configure, gdb.base/configure.in, gdb.base/configure,
gdb.c++/configure.in, gdb.c++/configure, gdb.disasm/configure.in,
gdb.disasm/configure, gdb.java/configure.in, gdb.java/configure,
gdb.mi/configure.in, gdb.mi/configure, gdb.mi/config.in,
gdb.threads/configure.in, gdb.threads/configure,
gdb.threads/config.in, gdb.trace/configure.in,
gdb.trace/configure: Removed.
2003-01-04 16:37:40 +01:00
|
|
|
set options [list debug incdir=$objdir]
|
2003-02-01 21:47:16 +01:00
|
|
|
if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $options] != "" } {
|
|
|
|
return -1
|
2002-09-24 21:36:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
mi_run_to_main
|
|
|
|
check_mi_and_console_threads "at main"
|
|
|
|
|
|
|
|
for {set i 0} {$i < 4} {incr i} {
|
|
|
|
mi_next "next, try $i"
|
|
|
|
check_mi_and_console_threads "try $i"
|
|
|
|
}
|
|
|
|
|
|
|
|
mi_gdb_exit
|
|
|
|
|