diff options
author | Stan Shebs <shebs@codesourcery.com> | 1994-06-08 19:25:43 +0000 |
---|---|---|
committer | Stan Shebs <shebs@codesourcery.com> | 1994-06-08 19:25:43 +0000 |
commit | 0fba9aa255008780fa0638908dd683122186b502 (patch) | |
tree | 59adc0b45f5295537d6d43d780baacf5c01ae20b /gdb/testsuite/config | |
parent | 0b3d0999e96c8ccc0c552dfee27be3d48d811f12 (diff) | |
download | gdb-0fba9aa255008780fa0638908dd683122186b502.zip gdb-0fba9aa255008780fa0638908dd683122186b502.tar.gz gdb-0fba9aa255008780fa0638908dd683122186b502.tar.bz2 |
Wed Jun 8 12:12:17 1994 Stan Shebs (shebs@andros.cygnus.com)
* config/udi-gdb.exp, config/unix-gdb.exp: Call default_gdb_start.
* lib/gdb.exp (default_gdb_start): Define.
Diffstat (limited to 'gdb/testsuite/config')
-rw-r--r-- | gdb/testsuite/config/udi-gdb.exp | 45 | ||||
-rw-r--r-- | gdb/testsuite/config/unix-gdb.exp | 70 |
2 files changed, 6 insertions, 109 deletions
diff --git a/gdb/testsuite/config/udi-gdb.exp b/gdb/testsuite/config/udi-gdb.exp index 5d44efc..0914446 100644 --- a/gdb/testsuite/config/udi-gdb.exp +++ b/gdb/testsuite/config/udi-gdb.exp @@ -1,5 +1,5 @@ # Test Framework Driver for GDB driving Universal Debug Interface on 29K -# Copyright 1988, 1990, 1991, 1992, 1993 Free Software Foundation, Inc. +# Copyright 1988, 1990, 1991, 1992, 1993, 1994 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 @@ -24,13 +24,6 @@ # NOTE: these test assume that there is a udi_soc file in th # -# these need to be initialized only if site.exp doesn't set them -set prompt "\(gdb\)" - -if ![info exists prompt] then { - set prompt "\(gdb\)" -} - load_lib gdb.exp load_lib udi.exp @@ -101,42 +94,8 @@ proc gdb_load { arg } { # UDICONF enviroment variable is set. # proc gdb_start { } { - global GDB - global GDBFLAGS - global spawn_id - global prompt - global verbose - - set GDB [which $GDB] - # start GDB - if [ llength $GDBFLAGS ] then { - spawn $GDB $GDBFLAGS - } else { - spawn $GDB - } - expect { - -re "GDB.*$prompt $" { - verbose "$GDB initialized for cross mode\n" - } - -re "$prompt $" { - perror "GDB never initialized." - return -1 - } - timeout { - perror "(timeout) GDB never initialized." - return -1 - } - } - - # force the height to "unlimited", so no pagers get used - send "set height 0\n" - expect -re ".*$prompt $" {} - # force the width to "unlimited", so no wraparound occurs - send "set width 0\n" - expect -re ".*$prompt $" {} - + default_gdb_start verbose "Setting up target, Please wait..." - gdb_target_udi } diff --git a/gdb/testsuite/config/unix-gdb.exp b/gdb/testsuite/config/unix-gdb.exp index 1edda20..886a0e6 100644 --- a/gdb/testsuite/config/unix-gdb.exp +++ b/gdb/testsuite/config/unix-gdb.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1988, 1990, 1991, 1992 Free Software Foundation, Inc. +# Copyright (C) 1988, 1990, 1991, 1992, 1994 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 @@ -60,72 +60,10 @@ proc gdb_load { arg } { return [gdb_file_cmd $arg] } -# -# start gdb -- start gdb running -# - -proc 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 "Seting width to 0." 2 - } - timeout { - warning "Couldn't set the width to 0." - } - } +proc gdb_start { } { + default_gdb_start } - + proc gdb_exit { } { catch default_gdb_exit } |