aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/config/sparclet.exp
diff options
context:
space:
mode:
authorBob Manson <manson@cygnus>1997-09-03 02:56:30 +0000
committerBob Manson <manson@cygnus>1997-09-03 02:56:30 +0000
commiteaac098bd37b4e90673ebc590ecde51a41ee03c9 (patch)
treeb4652bb350a1be02de3aaf1a5d6da1ede3cfc77e /gdb/testsuite/config/sparclet.exp
parent8bef8c3071461f595b67cc6297215e2a2f105d4a (diff)
downloadgdb-eaac098bd37b4e90673ebc590ecde51a41ee03c9.zip
gdb-eaac098bd37b4e90673ebc590ecde51a41ee03c9.tar.gz
gdb-eaac098bd37b4e90673ebc590ecde51a41ee03c9.tar.bz2
* config/sparclet.exp: Detect gratuitous change to sparclet gdb
target mode.
Diffstat (limited to 'gdb/testsuite/config/sparclet.exp')
-rw-r--r--gdb/testsuite/config/sparclet.exp44
1 files changed, 25 insertions, 19 deletions
diff --git a/gdb/testsuite/config/sparclet.exp b/gdb/testsuite/config/sparclet.exp
index db128b0..1919aca 100644
--- a/gdb/testsuite/config/sparclet.exp
+++ b/gdb/testsuite/config/sparclet.exp
@@ -181,10 +181,14 @@ proc gdb_sparclet_startup { arg } {
send_gdb "load $loader [target_info gdb_stub_offset]\n"
verbose "Loading $loader into $GDB" 2
+ set no_run_command 0;
gdb_expect 1200 {
-re "Loading.*$gdb_prompt $" {
verbose "Loaded $loader into $GDB" 1
}
+ -re "Transfer rate:.*Switching to remote protocol.*Remote debugging" {
+ set no_run_command 1;
+ }
-re "$gdb_prompt $" {
if $verbose>1 then {
perror "GDB couldn't load."
@@ -197,25 +201,27 @@ proc gdb_sparclet_startup { arg } {
}
}
- send_gdb "run\n";
- gdb_expect 60 {
- -re "A program is being debug.*Kill it.*y or n. $" {
- send_gdb "y\n"
- exp_continue
- }
- -re "The program being debugged .*y or n. $" {
- send_gdb "y\n"
- exp_continue
- }
- -re "Starting program:.*loader.*$" {
- verbose "Starting loader succeeded"
- }
- timeout {
- perror "(timeout) starting the loader" ;
- return -1
- }
- default {
- perror "error starting the loader";
+ if !$no_run_command {
+ send_gdb "run\n";
+ gdb_expect 60 {
+ -re "A program is being debug.*Kill it.*y or n. $" {
+ send_gdb "y\n"
+ exp_continue
+ }
+ -re "The program being debugged .*y or n. $" {
+ send_gdb "y\n"
+ exp_continue
+ }
+ -re "Starting program:.*loader.*$" {
+ verbose "Starting loader succeeded"
+ }
+ timeout {
+ perror "(timeout) starting the loader" ;
+ return -1
+ }
+ default {
+ perror "error starting the loader";
+ }
}
}
sleep 2;