diff options
author | Michael Snyder <msnyder@specifix.com> | 2001-05-04 21:07:01 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@specifix.com> | 2001-05-04 21:07:01 +0000 |
commit | c7486fd35e671fec976d40e32657541b3d18c688 (patch) | |
tree | 2a72c096cff863380122f83fc4e4534e42488837 /gdb/testsuite/config | |
parent | 4527d9b2dac42a4842c7433af0e75fcbba4550ab (diff) | |
download | gdb-c7486fd35e671fec976d40e32657541b3d18c688.tar.gz |
2001-05-03 Michael Snyder <msnyder@redhat.com>
* config/sid.exp (gdb_target_sid): Check for error messages.
On error or timeout, don't make expect exit (which will terminate
all subsequent tests); instead just make gdb exit.
(gdb_load): Check for error messages. On error or timeout,
return a negative value.
Diffstat (limited to 'gdb/testsuite/config')
-rw-r--r-- | gdb/testsuite/config/sid.exp | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/gdb/testsuite/config/sid.exp b/gdb/testsuite/config/sid.exp index 16b462085ba..7a73162fca0 100644 --- a/gdb/testsuite/config/sid.exp +++ b/gdb/testsuite/config/sid.exp @@ -141,13 +141,18 @@ proc gdb_target_sid { } { set timeout 60 verbose "Timeout is now $timeout seconds" 2 gdb_expect { + -re ".*\[Ee\]rror.*$gdb_prompt $" { + perror "Couldn't set target for remote simulator." + cleanup + gdb_exit + } -re "Remote debugging using.*$gdb_prompt" { verbose "Set target to sid" } timeout { perror "Couldn't set target for remote simulator." cleanup - exit $exit_status + gdb_exit } } set timeout $prev_timeout @@ -164,6 +169,7 @@ proc gdb_load { arg } { global loadfile global GDB global gdb_prompt + global retval gdb_unload if [gdb_file_cmd $arg] then { return -1 } @@ -175,24 +181,32 @@ proc gdb_load { arg } { set timeout 2400 verbose "Timeout is now $timeout seconds" 2 gdb_expect { + -re ".*\[Ee\]rror.*$gdb_prompt $" { + if $verbose>1 then { + perror "Error during download." + } + set retval -1; + } -re ".*$gdb_prompt $" { if $verbose>1 then { send_user "Loaded $arg into $GDB\n" } - set timeout 30 - verbose "Timeout is now $timeout seconds" 2 - return 1 + set retval 1; } -re "$gdb_prompt $" { if $verbose>1 then { perror "GDB couldn't load." } + set retval -1; } timeout { if $verbose>1 then { perror "Timed out trying to load $arg." } + set retval -1; } } set timeout $prev_timeout + verbose "Timeout is now $timeout seconds" 2 + return $retval; } |