old-cross-binutils/gdb/testsuite/gdb.hp/gdb.threads-hp/usrthfork.exp
Jeff Law ca344dff5c * gdb.hp/gdb.base-hp/so-thresh.exp: Update text in expect strings
to match current gdb output.  Update due to using auto-solib-limit
        for limiting instead of overloading auto-solib-add.
        * gdb.hp/gdb.base-hp/so-thresh.mk: Always use "cc" to build the
        test program.

        * gdb.c++/templates.exp: Use "hppa64-*-*", not "hppa2.0w-*-*"
        * gdb.hp/gdb.base-hp/dollar.exp: Likewise
        * gdb.hp/gdb.base-hp/pxdb.exp: Likewise.
        * gdb.hp/gdb.base-hp/reg-pa64.exp: Likewise.
        * gdb.hp/gdb.base-hp/reg.exp: Likewise.
        * gdb.hp/gdb.compat/xdb3.exp: Likewise.
        * gdb.hp/gdb.defects/bs15503.exp: Likewise.
        * gdb.hp/gdb.objdbg/objdbg01.exp: Likewise
        * gdb.hp/gdb.objdbg/objdbg02.exp: Likewise
        * gdb.hp/gdb.objdbg/objdbg03.exp: Likewise
        * gdb.hp/gdb.threads-hp/usrthbasic.exp: Likewise.
        * gdb.hp/gdb.threads-hp/usrthcore.exp: Likewise.
        * gdb.hp/gdb.threads-hp/usrthfork.exp: Likewise.
2001-12-20 23:37:33 +00:00

72 lines
2.3 KiB
Text

# user_th_basic.exp -- Expect script to test gdb with user threads
# Copyright (C) 1992 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
# 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@prep.ai.mit.edu
if $tracelevel {
strace $tracelevel
}
if { ![istarget "hppa*-*-hpux*"] || [istarget "hppa64-*-*"] } {
verbose "HPUX thread test ignored for non-hppa or PA64 targets."
return 0
}
set testfile usrthfork
set srcfile ${srcdir}/${subdir}/${testfile}.c
set binfile ${srcdir}/${subdir}/${testfile}
# To build the executable we need to link against the thread library.
#
# /opt/ansic/bin/cc -Ae -g -o usrthfork -lcma usrthfork.c
#
## we have trouble building it on 11.0, so we use the prebuilt
## executable instead.
##
##if { [gdb_compile "${srcdir}/${subdir}/${testfile}.c" "${binfile}" executable {debug additional_flags=-Ae ldflags=-lcma}] != "" } {
## gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
##}
#=========================
#
# Test looking at threads.
#
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
gdb_test "set follow-fork-mode parent" ".*" "set follow-fork-mode parent"
gdb_test "b main" "Breakpoint 1.*" "b main"
gdb_test "run" "Breakpoint 1, main.*:8.*" "run to main"
##gdb_test "next" \
## ".*New process.*Detaching after fork from process.*13.*parent.*" \
## "next on CMA fork"
send_gdb "next\n"
gdb_expect {
-re ".*Detaching after fork from.*$gdb_prompt $" {
pass "next on CMA fork"
}
-re ".*$gdb_prompt $" { fail "next on CMA fork" }
timeout { fail "(timeout) next on CMA fork" }
}
exec sleep 1
gdb_exit
return 0