diff options
author | Stan Shebs <shebs@codesourcery.com> | 1994-08-24 02:21:37 +0000 |
---|---|---|
committer | Stan Shebs <shebs@codesourcery.com> | 1994-08-24 02:21:37 +0000 |
commit | 70bcd4bc7eef9d23485716a2e96262d02ec58e66 (patch) | |
tree | 22b82a27fbcf7d6232d81e1f709f753552d1b9ec /gdb/testsuite/lib | |
parent | 86165efce578a0e5a8c8265a8e668498fab318ea (diff) | |
download | gdb-70bcd4bc7eef9d23485716a2e96262d02ec58e66.zip gdb-70bcd4bc7eef9d23485716a2e96262d02ec58e66.tar.gz gdb-70bcd4bc7eef9d23485716a2e96262d02ec58e66.tar.bz2 |
* lib/gdb.exp (gdb_run_cmd): Move comment out from between expect
patterns, since that is not a valid context for comments.
Diffstat (limited to 'gdb/testsuite/lib')
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index f6764d0..cb54c954 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -113,7 +113,11 @@ proc delete_breakpoints {} { # +# Generic run command. # +# The second pattern below matches up to the first newline *only*. +# Using ``.*$'' could swallow up output that we attempt to match +# elsewhere. # proc gdb_run_cmd {} { send "run\n" @@ -122,10 +126,6 @@ proc gdb_run_cmd {} { send "y\n" exp_continue } - - # The following pattern matches up to to the first newline *only*. - # Using ``.*$'' could swallow up output that we attempt to match - # elsewhere. -re "Starting program: \[^\n\]*" {} } } @@ -221,13 +221,15 @@ proc gdb_test { args } { set result -1 set errmess "" - # trap the send so any problems don't crash things - catch "send \"$command\n\"" errmess - if [string match "write.spawn_id=\[0-9\]+.:" $errmess] then { - perror "sent \"$command\" got expect error \"$errmess\"" - catch "close" - gdb_start - return -1 + if ![string match $command ""] { + # trap the send so any problems don't crash things + catch "send \"$command\n\"" errmess + if [string match "write.spawn_id=\[0-9\]+.:" $errmess] then { + perror "sent \"$command\" got expect error \"$errmess\"" + catch "close" + gdb_start + return -1 + } } expect { |