diff options
author | Bill Cox <bill@cygnus> | 1994-05-21 17:24:22 +0000 |
---|---|---|
committer | Bill Cox <bill@cygnus> | 1994-05-21 17:24:22 +0000 |
commit | 90fba5fa0f58e5c439414041a1679166b0eb2efe (patch) | |
tree | d93f8d8689f322c882b156dcb2f422e4697ceb92 /gdb/testsuite/lib | |
parent | a193acc0cc7d1100d100cff350195ee9a05472d4 (diff) | |
download | gdb-90fba5fa0f58e5c439414041a1679166b0eb2efe.zip gdb-90fba5fa0f58e5c439414041a1679166b0eb2efe.tar.gz gdb-90fba5fa0f58e5c439414041a1679166b0eb2efe.tar.bz2 |
* Revert the previous changes. Please see Rob's directory
/lisa/test/rob/progressive/gdb/testsuite for these fixes.
Diffstat (limited to 'gdb/testsuite/lib')
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 93 |
1 files changed, 13 insertions, 80 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 38cc31c..cf754f9 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -19,19 +19,13 @@ # This file was written by Fred Fish. (fnf@cygnus.com) -# set the prompt if it doesn't exist -global prompt -if ![info exists prompt] then { - set prompt "\[(\]gdb\[)\]" -} - # Generic gdb subroutines that should work for any target. If these # need to be modified for any target, it can be done with a variable # or by passing arguments. global GDB if ![info exists GDB] then { - set GDB [findfile $base_dir/../gdb "gdb" [transform gdb ]] + set GDB [transform gdb] } global GDBFLAGS @@ -39,6 +33,12 @@ if ![info exists GDBFLAGS] then { set GDBFLAGS "" } +# set the prompt if it doesn't exist +global prompt +if ![info exists prompt] then { + set prompt "\[(\]gdb\[)\]" +} + # # gdb_version -- extract and print the version number of gcc # @@ -301,13 +301,12 @@ proc default_gdb_exit {} { # This used to be 1 for unix-gdb.exp set timeout 5 - # this will kill the gdb process, it's cleaner than sending a quit. - close - - # Before this was here sometimes "uit" would get sent to the next GDB - # (assuming this is immediately followed by gdb_start), which would - # cause a loss of syncronization (i.e. all the stuff that swallows a - # prompt would swallow the wrong one). + # We used to try to send "quit" to GDB, and wait for it to die. + # Dealing with all the cases and errors got pretty hairy. Just close it, + # that is simpler. + close + + # Omitting this probably would cause strange timing-dependent failures. wait } @@ -374,72 +373,6 @@ oaded." } } - -# -# start gdb -- start gdb running -# -proc default_gdb_start { } { - global verbose - global GDB - global GDBFLAGS - global prompt - global spawn_id - global timeout - verbose "Spawning $GDB $GDBFLAGS" - - set oldtimeout $timeout - set timeout [expr "$timeout + 60"] - if [ llength $GDBFLAGS ] then { - if {[which $GDB] != 0} then { - spawn $GDB $GDBFLAGS - } else { - perror "$GDB does not exist." - exit 1 - } - } else { - if {[which $GDB] != 0} then { - spawn $GDB - } else { - perror "$GDB does not exist." - exit 1 - } - } - expect { - -re ".*\r\n$prompt $" { - verbose "GDB initialized for native mode" - } - -re "$prompt $" { - perror "GDB never initialized." - return -1 - } - timeout { - perror "(timeout) GDB never initialized." - return -1 - } - } - set timeout $oldtimeout - # force the height to "unlimited", so no pagers get used - send "set height 0\n" - expect { - -re ".*$prompt $" { - verbose "Setting height to 0." 2 - } - timeout { - warning "Couldn't set the height to 0." - } - } - # force the width to "unlimited", so no wraparound occurs - send "set width 0\n" - expect { - -re ".*$prompt $" { - verbose "Setting width to 0." 2 - } - timeout { - warning "Couldn't set the width to 0." - } - } -} - # # FIXME: this is a copy of the new library procedure, but it's here too # till the new dejagnu gets installed everywhere. I'd hate to break the |