1995-07-20 18:27:55 +00:00
|
|
|
# Copyright (C) 1994, 1995 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
|
From Rob Savoye (rob@poseidon.cygnus.com)
* Makefile.in, configure.in, gdb.base/{Makefile.in, configure.in},
gdb.c++/{Makefile.in, configure.in}, gdb.chill/{Makefile.in, configure.in},
gdb.disasm/{Makefile.in, configure.in}, gdb.stabs/{Makefile.in, configure.in},
gdb.threads/{Makefile.in, configure.in}: Major reworking for autoconfig.
* aclocal.m4, configure, gdb.base/configure, gdb.c++/configure,
gdb.disasm/configure, gdb.stabs/configure, gdb.stabs/default.mt : New files.
* config/unix-gdb.exp: Make GDB global.
* gdb.base/{a1-selftest.exp, a2-run.exp,bitfields.exp, break.exp, callfuncs.exp,
commands.exp, corefile.exp, crossload.exp, exprs.exp, funcargs.exp, interrupt.exp,
langs.exp, list.exp, mips_pro.exp, nodebug.exp, opaque.exp, printcmds.exp,
ptype.exp, recurse.exp, regs.exp, return.exp, scope.exp, setvar.exp, sigall.exp,
signals.exp, term.exp, twice.exp, watchpoint.exp, whatis.exp},
gdb.c++/{classes.exp, callfuncs.exp, inherit.exp, misc.exp, templates.exp,
virtfunc.exp}, gdb.chill/{callch.exp, chillvars.exp, misc.exp, pr-4975.exp,
pr-5016.exp, pr-5020.exp, pr-5022.exp, pr-5646.exp, pr-5984.exp, pr-6292.exp,
pr-6632.exp, pr-8134.exp, pr-8136.exp, result.exp, string.exp, tuples.exp},
gdb.disasm/{hppa.exp, sh3.exp}, gdb.stabs/weird.exp: Change continues
to returns as necessary, arrange for test to compile own testcase executable.
* lib/gdb.exp: Changes for testsuite to compile own test cases.
From Fred Fish (fnf@cygnus.com)
* gdb.c++/classes.exp (test_pointers_to_class_members): Add
clear_xfail at end of test which might not call either pass or fail.
* gdb.base/a1-selftest.exp: Add i*86-*-linuxaout xfail for
"backtrace through signal handler".
1995-11-25 19:55:29 +00:00
|
|
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
1995-07-20 18:27:55 +00:00
|
|
|
|
|
|
|
# Please email any bugs, comments, and/or additions to this file to:
|
|
|
|
# bug-gdb@prep.ai.mit.edu
|
|
|
|
|
1997-01-29 09:40:31 +00:00
|
|
|
if [host_info exists name] {
|
|
|
|
if [board_info host exists gdb,nointerrupts] {
|
1995-07-20 18:27:55 +00:00
|
|
|
verbose "Skipping interrupt.exp because of nointerrupts."
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
1995-01-27 05:40:50 +00:00
|
|
|
if $tracelevel then {
|
|
|
|
strace $tracelevel
|
|
|
|
}
|
|
|
|
|
|
|
|
set prms_id 0
|
|
|
|
set bug_id 0
|
|
|
|
|
From Rob Savoye (rob@poseidon.cygnus.com)
* Makefile.in, configure.in, gdb.base/{Makefile.in, configure.in},
gdb.c++/{Makefile.in, configure.in}, gdb.chill/{Makefile.in, configure.in},
gdb.disasm/{Makefile.in, configure.in}, gdb.stabs/{Makefile.in, configure.in},
gdb.threads/{Makefile.in, configure.in}: Major reworking for autoconfig.
* aclocal.m4, configure, gdb.base/configure, gdb.c++/configure,
gdb.disasm/configure, gdb.stabs/configure, gdb.stabs/default.mt : New files.
* config/unix-gdb.exp: Make GDB global.
* gdb.base/{a1-selftest.exp, a2-run.exp,bitfields.exp, break.exp, callfuncs.exp,
commands.exp, corefile.exp, crossload.exp, exprs.exp, funcargs.exp, interrupt.exp,
langs.exp, list.exp, mips_pro.exp, nodebug.exp, opaque.exp, printcmds.exp,
ptype.exp, recurse.exp, regs.exp, return.exp, scope.exp, setvar.exp, sigall.exp,
signals.exp, term.exp, twice.exp, watchpoint.exp, whatis.exp},
gdb.c++/{classes.exp, callfuncs.exp, inherit.exp, misc.exp, templates.exp,
virtfunc.exp}, gdb.chill/{callch.exp, chillvars.exp, misc.exp, pr-4975.exp,
pr-5016.exp, pr-5020.exp, pr-5022.exp, pr-5646.exp, pr-5984.exp, pr-6292.exp,
pr-6632.exp, pr-8134.exp, pr-8136.exp, result.exp, string.exp, tuples.exp},
gdb.disasm/{hppa.exp, sh3.exp}, gdb.stabs/weird.exp: Change continues
to returns as necessary, arrange for test to compile own testcase executable.
* lib/gdb.exp: Changes for testsuite to compile own test cases.
From Fred Fish (fnf@cygnus.com)
* gdb.c++/classes.exp (test_pointers_to_class_members): Add
clear_xfail at end of test which might not call either pass or fail.
* gdb.base/a1-selftest.exp: Add i*86-*-linuxaout xfail for
"backtrace through signal handler".
1995-11-25 19:55:29 +00:00
|
|
|
set testfile interrupt
|
1997-01-29 09:40:31 +00:00
|
|
|
set srcfile ${testfile}.c
|
From Rob Savoye (rob@poseidon.cygnus.com)
* Makefile.in, configure.in, gdb.base/{Makefile.in, configure.in},
gdb.c++/{Makefile.in, configure.in}, gdb.chill/{Makefile.in, configure.in},
gdb.disasm/{Makefile.in, configure.in}, gdb.stabs/{Makefile.in, configure.in},
gdb.threads/{Makefile.in, configure.in}: Major reworking for autoconfig.
* aclocal.m4, configure, gdb.base/configure, gdb.c++/configure,
gdb.disasm/configure, gdb.stabs/configure, gdb.stabs/default.mt : New files.
* config/unix-gdb.exp: Make GDB global.
* gdb.base/{a1-selftest.exp, a2-run.exp,bitfields.exp, break.exp, callfuncs.exp,
commands.exp, corefile.exp, crossload.exp, exprs.exp, funcargs.exp, interrupt.exp,
langs.exp, list.exp, mips_pro.exp, nodebug.exp, opaque.exp, printcmds.exp,
ptype.exp, recurse.exp, regs.exp, return.exp, scope.exp, setvar.exp, sigall.exp,
signals.exp, term.exp, twice.exp, watchpoint.exp, whatis.exp},
gdb.c++/{classes.exp, callfuncs.exp, inherit.exp, misc.exp, templates.exp,
virtfunc.exp}, gdb.chill/{callch.exp, chillvars.exp, misc.exp, pr-4975.exp,
pr-5016.exp, pr-5020.exp, pr-5022.exp, pr-5646.exp, pr-5984.exp, pr-6292.exp,
pr-6632.exp, pr-8134.exp, pr-8136.exp, result.exp, string.exp, tuples.exp},
gdb.disasm/{hppa.exp, sh3.exp}, gdb.stabs/weird.exp: Change continues
to returns as necessary, arrange for test to compile own testcase executable.
* lib/gdb.exp: Changes for testsuite to compile own test cases.
From Fred Fish (fnf@cygnus.com)
* gdb.c++/classes.exp (test_pointers_to_class_members): Add
clear_xfail at end of test which might not call either pass or fail.
* gdb.base/a1-selftest.exp: Add i*86-*-linuxaout xfail for
"backtrace through signal handler".
1995-11-25 19:55:29 +00:00
|
|
|
set binfile ${objdir}/${subdir}/${testfile}
|
1997-01-29 09:40:31 +00:00
|
|
|
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
From Rob Savoye (rob@poseidon.cygnus.com)
* Makefile.in, configure.in, gdb.base/{Makefile.in, configure.in},
gdb.c++/{Makefile.in, configure.in}, gdb.chill/{Makefile.in, configure.in},
gdb.disasm/{Makefile.in, configure.in}, gdb.stabs/{Makefile.in, configure.in},
gdb.threads/{Makefile.in, configure.in}: Major reworking for autoconfig.
* aclocal.m4, configure, gdb.base/configure, gdb.c++/configure,
gdb.disasm/configure, gdb.stabs/configure, gdb.stabs/default.mt : New files.
* config/unix-gdb.exp: Make GDB global.
* gdb.base/{a1-selftest.exp, a2-run.exp,bitfields.exp, break.exp, callfuncs.exp,
commands.exp, corefile.exp, crossload.exp, exprs.exp, funcargs.exp, interrupt.exp,
langs.exp, list.exp, mips_pro.exp, nodebug.exp, opaque.exp, printcmds.exp,
ptype.exp, recurse.exp, regs.exp, return.exp, scope.exp, setvar.exp, sigall.exp,
signals.exp, term.exp, twice.exp, watchpoint.exp, whatis.exp},
gdb.c++/{classes.exp, callfuncs.exp, inherit.exp, misc.exp, templates.exp,
virtfunc.exp}, gdb.chill/{callch.exp, chillvars.exp, misc.exp, pr-4975.exp,
pr-5016.exp, pr-5020.exp, pr-5022.exp, pr-5646.exp, pr-5984.exp, pr-6292.exp,
pr-6632.exp, pr-8134.exp, pr-8136.exp, result.exp, string.exp, tuples.exp},
gdb.disasm/{hppa.exp, sh3.exp}, gdb.stabs/weird.exp: Change continues
to returns as necessary, arrange for test to compile own testcase executable.
* lib/gdb.exp: Changes for testsuite to compile own test cases.
From Fred Fish (fnf@cygnus.com)
* gdb.c++/classes.exp (test_pointers_to_class_members): Add
clear_xfail at end of test which might not call either pass or fail.
* gdb.base/a1-selftest.exp: Add i*86-*-linuxaout xfail for
"backtrace through signal handler".
1995-11-25 19:55:29 +00:00
|
|
|
perror "Couldn't compile ${srcfile}"
|
|
|
|
return -1
|
|
|
|
}
|
1995-01-27 05:40:50 +00:00
|
|
|
|
1997-01-29 09:40:31 +00:00
|
|
|
if [target_info exists gdb,noinferiorio] {
|
1995-07-20 18:27:55 +00:00
|
|
|
verbose "Skipping interrupt.exp because of noinferiorio."
|
|
|
|
return
|
|
|
|
}
|
1997-01-29 09:40:31 +00:00
|
|
|
|
|
|
|
gdb_start
|
|
|
|
|
1995-07-20 18:27:55 +00:00
|
|
|
|
1995-01-27 05:40:50 +00:00
|
|
|
if ![file exists $binfile] then {
|
|
|
|
perror "$binfile does not exist."
|
|
|
|
return 0
|
|
|
|
} else {
|
|
|
|
gdb_reinitialize_dir $srcdir/$subdir
|
|
|
|
gdb_load $binfile
|
1997-01-29 09:40:31 +00:00
|
|
|
# Hope this is unix :-)
|
1995-07-20 18:27:55 +00:00
|
|
|
gdb_test "shell stty intr '^C'" "" \
|
1995-01-27 05:40:50 +00:00
|
|
|
"set interrupt character in interrupt.exp"
|
1995-07-20 18:27:55 +00:00
|
|
|
if [runto_main] then {
|
1997-01-29 09:40:31 +00:00
|
|
|
send_gdb "continue\n"
|
1995-01-27 05:40:50 +00:00
|
|
|
expect {
|
1997-01-29 09:40:31 +00:00
|
|
|
-re "\r\ntalk to me baby\r\n$" {
|
|
|
|
pass "child process is alive"
|
|
|
|
}
|
1995-01-27 05:40:50 +00:00
|
|
|
timeout { fail "run (timeout)" }
|
|
|
|
eof { fail "run (eof)" }
|
|
|
|
}
|
|
|
|
# This should appear twice, once for the echo and once for the
|
|
|
|
# program's output. Under dejagnu (but not interactively) for
|
|
|
|
# SunOS4, it only appears once. Don't worry about it, I imagine
|
|
|
|
# dejagnu has just done something to the tty modes.
|
1997-01-29 09:40:31 +00:00
|
|
|
send_gdb "a\n"
|
1995-01-27 05:40:50 +00:00
|
|
|
expect {
|
1997-01-29 09:40:31 +00:00
|
|
|
-re "^a\r\n(|a\r\n)$" {
|
|
|
|
pass "child process ate our char"
|
|
|
|
}
|
1995-01-27 05:40:50 +00:00
|
|
|
timeout { fail "echo a (timeout)" }
|
|
|
|
eof { fail "echo a (eof)" }
|
|
|
|
}
|
|
|
|
# Wait until the program is in the read system call again.
|
1997-01-29 09:40:31 +00:00
|
|
|
sleep 2
|
1995-01-27 05:40:50 +00:00
|
|
|
|
1997-01-29 09:40:31 +00:00
|
|
|
send_gdb "\003"
|
1995-01-27 05:40:50 +00:00
|
|
|
expect {
|
1997-02-02 07:59:25 +00:00
|
|
|
-re "Program received signal SIGINT.*$gdb_prompt $" {
|
1997-01-29 09:40:31 +00:00
|
|
|
pass "send_gdb control C"
|
1995-01-27 05:40:50 +00:00
|
|
|
}
|
1997-02-02 07:59:25 +00:00
|
|
|
-re ".*$gdb_prompt $" { fail "send_gdb control C" }
|
1997-01-29 09:40:31 +00:00
|
|
|
timeout { fail "send_gdb control C (timeout)" }
|
|
|
|
eof { fail "send_gdb control C (eof)" }
|
1995-01-27 05:40:50 +00:00
|
|
|
}
|
|
|
|
|
1997-01-29 09:40:31 +00:00
|
|
|
send_gdb "p func1 ()\n"
|
1995-01-27 05:40:50 +00:00
|
|
|
expect {
|
1997-02-02 07:59:25 +00:00
|
|
|
-re " = 4.*$gdb_prompt $" { pass "call function when asleep" }
|
|
|
|
-re ".*Program received signal SIGSEGV.*$gdb_prompt $" {
|
1997-01-29 09:40:31 +00:00
|
|
|
setup_xfail "i*86-pc-linux*-gnu"
|
|
|
|
fail "child died when we called func1, skipped rest of tests"
|
|
|
|
return
|
|
|
|
}
|
1997-02-02 07:59:25 +00:00
|
|
|
-re "$gdb_prompt $" { fail "call function when asleep (wrong output)" }
|
From Rob Savoye (rob@poseidon.cygnus.com)
* Makefile.in, configure.in, gdb.base/{Makefile.in, configure.in},
gdb.c++/{Makefile.in, configure.in}, gdb.chill/{Makefile.in, configure.in},
gdb.disasm/{Makefile.in, configure.in}, gdb.stabs/{Makefile.in, configure.in},
gdb.threads/{Makefile.in, configure.in}: Major reworking for autoconfig.
* aclocal.m4, configure, gdb.base/configure, gdb.c++/configure,
gdb.disasm/configure, gdb.stabs/configure, gdb.stabs/default.mt : New files.
* config/unix-gdb.exp: Make GDB global.
* gdb.base/{a1-selftest.exp, a2-run.exp,bitfields.exp, break.exp, callfuncs.exp,
commands.exp, corefile.exp, crossload.exp, exprs.exp, funcargs.exp, interrupt.exp,
langs.exp, list.exp, mips_pro.exp, nodebug.exp, opaque.exp, printcmds.exp,
ptype.exp, recurse.exp, regs.exp, return.exp, scope.exp, setvar.exp, sigall.exp,
signals.exp, term.exp, twice.exp, watchpoint.exp, whatis.exp},
gdb.c++/{classes.exp, callfuncs.exp, inherit.exp, misc.exp, templates.exp,
virtfunc.exp}, gdb.chill/{callch.exp, chillvars.exp, misc.exp, pr-4975.exp,
pr-5016.exp, pr-5020.exp, pr-5022.exp, pr-5646.exp, pr-5984.exp, pr-6292.exp,
pr-6632.exp, pr-8134.exp, pr-8136.exp, result.exp, string.exp, tuples.exp},
gdb.disasm/{hppa.exp, sh3.exp}, gdb.stabs/weird.exp: Change continues
to returns as necessary, arrange for test to compile own testcase executable.
* lib/gdb.exp: Changes for testsuite to compile own test cases.
From Fred Fish (fnf@cygnus.com)
* gdb.c++/classes.exp (test_pointers_to_class_members): Add
clear_xfail at end of test which might not call either pass or fail.
* gdb.base/a1-selftest.exp: Add i*86-*-linuxaout xfail for
"backtrace through signal handler".
1995-11-25 19:55:29 +00:00
|
|
|
default {
|
1995-01-27 05:40:50 +00:00
|
|
|
|
|
|
|
# This fail probably happens whenever we use /proc (we
|
|
|
|
# don't use PRSABORT), but apparently also happens on
|
|
|
|
# other machines as well.
|
|
|
|
|
1997-01-29 09:40:31 +00:00
|
|
|
setup_xfail "sparc*-*-solaris2*"
|
1995-01-27 05:40:50 +00:00
|
|
|
setup_xfail "mips-*-ultrix*"
|
|
|
|
setup_xfail "hppa*-*-*"
|
|
|
|
setup_xfail "i386*-*-bsd*"
|
|
|
|
setup_xfail "*-*-sysv4*"
|
|
|
|
setup_xfail "vax-*-*"
|
|
|
|
setup_xfail "alpha-*-*"
|
|
|
|
setup_xfail "*-*-irix*"
|
1995-07-20 18:27:55 +00:00
|
|
|
setup_xfail "*-*-hpux*"
|
From Rob Savoye (rob@poseidon.cygnus.com)
* Makefile.in, configure.in, gdb.base/{Makefile.in, configure.in},
gdb.c++/{Makefile.in, configure.in}, gdb.chill/{Makefile.in, configure.in},
gdb.disasm/{Makefile.in, configure.in}, gdb.stabs/{Makefile.in, configure.in},
gdb.threads/{Makefile.in, configure.in}: Major reworking for autoconfig.
* aclocal.m4, configure, gdb.base/configure, gdb.c++/configure,
gdb.disasm/configure, gdb.stabs/configure, gdb.stabs/default.mt : New files.
* config/unix-gdb.exp: Make GDB global.
* gdb.base/{a1-selftest.exp, a2-run.exp,bitfields.exp, break.exp, callfuncs.exp,
commands.exp, corefile.exp, crossload.exp, exprs.exp, funcargs.exp, interrupt.exp,
langs.exp, list.exp, mips_pro.exp, nodebug.exp, opaque.exp, printcmds.exp,
ptype.exp, recurse.exp, regs.exp, return.exp, scope.exp, setvar.exp, sigall.exp,
signals.exp, term.exp, twice.exp, watchpoint.exp, whatis.exp},
gdb.c++/{classes.exp, callfuncs.exp, inherit.exp, misc.exp, templates.exp,
virtfunc.exp}, gdb.chill/{callch.exp, chillvars.exp, misc.exp, pr-4975.exp,
pr-5016.exp, pr-5020.exp, pr-5022.exp, pr-5646.exp, pr-5984.exp, pr-6292.exp,
pr-6632.exp, pr-8134.exp, pr-8136.exp, result.exp, string.exp, tuples.exp},
gdb.disasm/{hppa.exp, sh3.exp}, gdb.stabs/weird.exp: Change continues
to returns as necessary, arrange for test to compile own testcase executable.
* lib/gdb.exp: Changes for testsuite to compile own test cases.
From Fred Fish (fnf@cygnus.com)
* gdb.c++/classes.exp (test_pointers_to_class_members): Add
clear_xfail at end of test which might not call either pass or fail.
* gdb.base/a1-selftest.exp: Add i*86-*-linuxaout xfail for
"backtrace through signal handler".
1995-11-25 19:55:29 +00:00
|
|
|
setup_xfail "*-*-*lynx*"
|
1995-01-27 05:40:50 +00:00
|
|
|
fail "call function when asleep (stays asleep)"
|
1997-01-29 09:40:31 +00:00
|
|
|
# Send_Gdb a newline to wake it up
|
|
|
|
send_gdb "\n"
|
1995-01-27 05:40:50 +00:00
|
|
|
gdb_test "" " = 4" "call function after waking it"
|
|
|
|
}
|
From Rob Savoye (rob@poseidon.cygnus.com)
* Makefile.in, configure.in, gdb.base/{Makefile.in, configure.in},
gdb.c++/{Makefile.in, configure.in}, gdb.chill/{Makefile.in, configure.in},
gdb.disasm/{Makefile.in, configure.in}, gdb.stabs/{Makefile.in, configure.in},
gdb.threads/{Makefile.in, configure.in}: Major reworking for autoconfig.
* aclocal.m4, configure, gdb.base/configure, gdb.c++/configure,
gdb.disasm/configure, gdb.stabs/configure, gdb.stabs/default.mt : New files.
* config/unix-gdb.exp: Make GDB global.
* gdb.base/{a1-selftest.exp, a2-run.exp,bitfields.exp, break.exp, callfuncs.exp,
commands.exp, corefile.exp, crossload.exp, exprs.exp, funcargs.exp, interrupt.exp,
langs.exp, list.exp, mips_pro.exp, nodebug.exp, opaque.exp, printcmds.exp,
ptype.exp, recurse.exp, regs.exp, return.exp, scope.exp, setvar.exp, sigall.exp,
signals.exp, term.exp, twice.exp, watchpoint.exp, whatis.exp},
gdb.c++/{classes.exp, callfuncs.exp, inherit.exp, misc.exp, templates.exp,
virtfunc.exp}, gdb.chill/{callch.exp, chillvars.exp, misc.exp, pr-4975.exp,
pr-5016.exp, pr-5020.exp, pr-5022.exp, pr-5646.exp, pr-5984.exp, pr-6292.exp,
pr-6632.exp, pr-8134.exp, pr-8136.exp, result.exp, string.exp, tuples.exp},
gdb.disasm/{hppa.exp, sh3.exp}, gdb.stabs/weird.exp: Change continues
to returns as necessary, arrange for test to compile own testcase executable.
* lib/gdb.exp: Changes for testsuite to compile own test cases.
From Fred Fish (fnf@cygnus.com)
* gdb.c++/classes.exp (test_pointers_to_class_members): Add
clear_xfail at end of test which might not call either pass or fail.
* gdb.base/a1-selftest.exp: Add i*86-*-linuxaout xfail for
"backtrace through signal handler".
1995-11-25 19:55:29 +00:00
|
|
|
# eof { fail "call function when asleep (eof)" }
|
1995-01-27 05:40:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# Now try calling the function again.
|
|
|
|
gdb_test "p func1 ()" " = 4" "call function a second time"
|
|
|
|
|
|
|
|
# And the program should still be doing the same thing.
|
|
|
|
# The optional trailing \r\n is in case we sent a newline above
|
|
|
|
# to wake the program, in which case the program now sends it
|
|
|
|
# back. We check for it either here or in the next expect
|
|
|
|
# command, because which one it ends up in is timing dependent.
|
1997-01-29 09:40:31 +00:00
|
|
|
send_gdb "continue\n"
|
1995-01-27 05:40:50 +00:00
|
|
|
# For some reason, i386-*-sysv4 gdb fails to issue the Continuing
|
|
|
|
# message, but otherwise appears normal (FIXME).
|
|
|
|
expect {
|
|
|
|
-re "^continue\r\nContinuing.\r\n(\r\n|)$" { pass "continue" }
|
|
|
|
-re "^continue\r\n\r\n" { fail "continue (missing Continuing.)" }
|
1997-02-02 07:59:25 +00:00
|
|
|
-re "$gdb_prompt $" { fail "continue" }
|
1997-01-29 09:40:31 +00:00
|
|
|
timeout { fail "continue (timeout)" }
|
|
|
|
eof { fail "continue (eof)" }
|
1995-01-27 05:40:50 +00:00
|
|
|
}
|
|
|
|
|
1997-01-29 09:40:31 +00:00
|
|
|
send_gdb "data\n"
|
1995-01-27 05:40:50 +00:00
|
|
|
# The optional leading \r\n is in case we sent a newline above
|
|
|
|
# to wake the program, in which case the program now sends it
|
|
|
|
# back.
|
|
|
|
expect {
|
|
|
|
-re "^(\r\n|)data\r\n(|data\r\n)$" { pass "echo data" }
|
|
|
|
timeout { fail "echo data (timeout)" }
|
|
|
|
eof { fail "echo data (eof)" }
|
|
|
|
}
|
|
|
|
|
1997-01-29 09:40:31 +00:00
|
|
|
setup_xfail "i*86-pc-linux*-gnu"
|
|
|
|
send_gdb "\004"
|
1995-01-27 05:40:50 +00:00
|
|
|
expect {
|
1997-02-02 07:59:25 +00:00
|
|
|
-re "end of file.*Program exited normally.*$gdb_prompt $" {
|
1997-01-29 09:40:31 +00:00
|
|
|
pass "send_gdb end of file"
|
1995-01-27 05:40:50 +00:00
|
|
|
}
|
1997-02-02 07:59:25 +00:00
|
|
|
-re "$gdb_prompt $" { fail "send end of file" }
|
1995-01-27 05:40:50 +00:00
|
|
|
timeout { fail "send end of file (timeout)" }
|
|
|
|
eof { fail "send end of file (eof)" }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0
|