Apply patches from gdb 4.12 testing.

This commit is contained in:
Rob Savoye
1994-01-17 23:28:29 +00:00
parent 0ab6de2336
commit 002cc99ff6

View File

@ -290,21 +290,20 @@ proc default_gdb_exit {} {
global GDBFLAGS global GDBFLAGS
global verbose global verbose
verbose "Quitting $GDB $GDBFLAGS" 1 verbose "Quitting $GDB $GDBFLAGS"
# This used to be 1 for unix-gdb.exp # This used to be 1 for unix-gdb.exp
set timeout 5 set timeout 5
catch "send \"quit\n\"" result catch "send \"quit\n\"" result
# If the process has gone away (e.g. gdb dumped core), deal with it. # If the process has gone away (e.g. gdb dumped core), deal with it.
if [string match "write\(spawn_id=\[0-9\]+\):" $result] then { if [string match "write\[(\]+spawn_id=\[0-9)\]+:" $result] then {
catch "close" catch "close"
# FIXME: Shouldn't we call "wait" too? # FIXME: Shouldn't we call "wait" too?
return -1 return -1
} }
# FIXME: What is this catch statement doing here? Won't it prevent us # FIXME: What is this catch statement doing here? Won't it prevent us
# from getting errors that we'd rather see? # from getting errors that we'd rather see?
catch {
expect { expect {
eof { eof {
verbose "Got EOF from $GDB" 2 verbose "Got EOF from $GDB" 2
@ -317,7 +316,6 @@ proc default_gdb_exit {} {
verbose "Killing program being debugged" 2 verbose "Killing program being debugged" 2
} }
} }
}
# Before this was here sometimes "uit" would get sent to the next GDB # Before this was here sometimes "uit" would get sent to the next GDB
# (assuming this is immediately followed by gdb_start), which would # (assuming this is immediately followed by gdb_start), which would
@ -394,7 +392,8 @@ oaded."
# till the new dejagnu gets installed everywhere. I'd hate to break the # till the new dejagnu gets installed everywhere. I'd hate to break the
# gdb tests suite. # gdb tests suite.
# #
if [string match "" [info proc exp_continue]] { global argv0
if ![info exists argv0] then {
proc exp_continue { } { proc exp_continue { } {
continue -expect continue -expect
} }