aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Savoye <rob@cygnus>1993-04-12 22:15:10 +0000
committerRob Savoye <rob@cygnus>1993-04-12 22:15:10 +0000
commit32a02b2a49fe55dd888db0af0b02914e88c753db (patch)
tree9e83b12ef60ef40a0771fa2ec93d2b1322298a44
parent0a819c04294b14340e8bbc449b7e25857c6c6c61 (diff)
downloadgdb-32a02b2a49fe55dd888db0af0b02914e88c753db.zip
gdb-32a02b2a49fe55dd888db0af0b02914e88c753db.tar.gz
gdb-32a02b2a49fe55dd888db0af0b02914e88c753db.tar.bz2
Make sure $GDB contains a real program.
-rw-r--r--gdb/testsuite/config/unix-gdb.exp15
1 files changed, 12 insertions, 3 deletions
diff --git a/gdb/testsuite/config/unix-gdb.exp b/gdb/testsuite/config/unix-gdb.exp
index 64283d3..6282f4c 100644
--- a/gdb/testsuite/config/unix-gdb.exp
+++ b/gdb/testsuite/config/unix-gdb.exp
@@ -39,10 +39,14 @@ if ![info exists decimal] then {
proc gdb_version {} {
global GDB
global GDBFLAGS
+ if {[which $GDB] != 0} then {
set tmp [exec echo "q" | $GDB]
set version [lindex $tmp [lsearch $tmp "\[0-9\]*"]]
set version [string range $version 0 [expr [string length $version]-2]]
clone_output "[which $GDB] version $version $GDBFLAGS\n"
+ } else {
+ warning "$GDB does not exist"
+}
}
#
@@ -95,7 +99,6 @@ proc gdb_load { arg } {
if $verbose>1 then {
send_user "\t\tLoaded $arg into the $GDB\n"
}
- return 0
}
-re "has no symbol-table.*$prompt $" {
error "$arg wasn't compiled with \"-g\""
@@ -202,12 +205,18 @@ proc gdb_start {} {
set oldtimeout $timeout
set timeout [expr "$timeout + 60"]
if [ llength $GDBFLAGS ] then {
+ if {[which $GDB] != 0} then {
spawn $GDB $GDBFLAGS
} else {
- if {[which $GDB] != 0} then {
+ error "$GDB does not exist."
+ exit 1
+ }
+ } else {
+ IF {[WHICH $GDB] != 0} then {
spawn $GDB
} else {
- error "Can't find $GDB"
+ error "$GDB does not exist."
+ exit 1
}
}
expect {