* 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 15:37:40 +00:00
|
|
|
# Copyright 2002, 2003 Free Software Foundation, Inc.
|
2002-09-03 20:02:48 +00: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
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
|
|
|
|
# Please email any bugs, comments, and/or additions to this file to:
|
|
|
|
# bug-gdb@gnu.org
|
|
|
|
|
|
|
|
# This is a regression test for gdb/568 in the sources.redhat.com
|
|
|
|
# GNATS database. As of early June 2002, GDB could get sort of wedged
|
|
|
|
# debugging the program `killed.c':
|
|
|
|
#
|
|
|
|
# $ $D6/gdb/gdb -nw killed
|
|
|
|
# GNU gdb 2002-06-11-cvs
|
|
|
|
# Copyright 2002 Free Software Foundation, Inc.
|
|
|
|
# GDB is free software, covered by the GNU General Public License, and you are
|
|
|
|
# welcome to change it and/or distribute copies of it under certain conditions.
|
|
|
|
# Type "show copying" to see the conditions.
|
|
|
|
# There is absolutely no warranty for GDB. Type "show warranty" for details.
|
|
|
|
# This GDB was configured as "i686-pc-linux-gnu"...
|
|
|
|
# (gdb) run
|
|
|
|
# Starting program: /home/jimb/foo/play/killed
|
|
|
|
# [New Thread 1024 (LWP 6487)]
|
|
|
|
# [New Thread 2049 (LWP 6488)]
|
|
|
|
# [New Thread 1026 (LWP 6489)]
|
|
|
|
# Cannot find user-level thread for LWP 6487: generic error
|
|
|
|
# (gdb) quit
|
|
|
|
# The program is running. Exit anyway? (y or n) y
|
|
|
|
# Cannot find thread 2049: generic error
|
|
|
|
# (gdb) kill
|
|
|
|
# Kill the program being debugged? (y or n) y
|
|
|
|
# Cannot find thread 2049: generic error
|
|
|
|
# (gdb) The program is running. Exit anyway? (y or n) y
|
|
|
|
# Cannot find thread 2049: generic error
|
|
|
|
# (gdb)
|
|
|
|
# [7]+ Stopped $D6/gdb/gdb -nw killed
|
|
|
|
# $ kill %7
|
|
|
|
#
|
|
|
|
# [7]+ Stopped $D6/gdb/gdb -nw killed
|
|
|
|
# $ kill -9 %7
|
|
|
|
#
|
|
|
|
# [7]+ Stopped $D6/gdb/gdb -nw killed
|
|
|
|
# $
|
|
|
|
# [7]+ Killed $D6/gdb/gdb -nw killed
|
|
|
|
# $
|
|
|
|
|
|
|
|
if $tracelevel then {
|
|
|
|
strace $tracelevel
|
|
|
|
}
|
|
|
|
|
|
|
|
set prms_id 0
|
|
|
|
set bug_id 0
|
|
|
|
|
|
|
|
set testfile "killed"
|
|
|
|
set srcfile ${testfile}.c
|
|
|
|
set binfile ${objdir}/${subdir}/${testfile}
|
|
|
|
|
* 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 15:37:40 +00:00
|
|
|
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
|
2003-01-04 23:05:05 +00:00
|
|
|
return -1
|
2002-09-03 20:02:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
gdb_start
|
|
|
|
gdb_reinitialize_dir $srcdir/$subdir
|
|
|
|
gdb_load ${binfile}
|
|
|
|
|
2003-10-13 16:32:51 +00:00
|
|
|
gdb_run_cmd
|
|
|
|
gdb_expect {
|
|
|
|
-re "$gdb_prompt $" {
|
|
|
|
pass "run program to completion"
|
|
|
|
}
|
|
|
|
timeout "$gdb_prompt $" {
|
|
|
|
fail "run program to completion (timeout)"
|
|
|
|
}
|
|
|
|
}
|
2002-09-03 20:02:48 +00:00
|
|
|
|
|
|
|
# Try to quit.
|
|
|
|
send_gdb "quit\n"
|
|
|
|
gdb_expect {
|
|
|
|
-re "The program is running. Exit anyway\\? \\(y or n\\) $" {
|
|
|
|
send_gdb "y\n"
|
|
|
|
exp_continue
|
|
|
|
}
|
|
|
|
eof {
|
|
|
|
pass "GDB exits after multi-threaded program exits messily"
|
|
|
|
}
|
|
|
|
-re "Cannot find thread ${decimal}: generic error\[\r\n\]*$gdb_prompt $" {
|
2003-01-14 18:13:11 +00:00
|
|
|
kfail "gdb/568" "GDB exits after multi-threaded program exits messily"
|
2002-09-03 20:02:48 +00:00
|
|
|
}
|
|
|
|
timeout {
|
|
|
|
fail "GDB exits after multi-threaded program exits messily (timeout)"
|
|
|
|
}
|
|
|
|
}
|