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.
This commit is contained in:
parent
ca3f91ed68
commit
66c756c665
|
@ -1,3 +1,11 @@
|
||||||
|
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.
|
||||||
|
|
||||||
2001-04-24 Jim Blandy <jimb@redhat.com>
|
2001-04-24 Jim Blandy <jimb@redhat.com>
|
||||||
|
|
||||||
* gdb.c++/templates.exp: If we see the prompt for the overload
|
* gdb.c++/templates.exp: If we see the prompt for the overload
|
||||||
|
|
|
@ -141,13 +141,18 @@ proc gdb_target_sid { } {
|
||||||
set timeout 60
|
set timeout 60
|
||||||
verbose "Timeout is now $timeout seconds" 2
|
verbose "Timeout is now $timeout seconds" 2
|
||||||
gdb_expect {
|
gdb_expect {
|
||||||
|
-re ".*\[Ee\]rror.*$gdb_prompt $" {
|
||||||
|
perror "Couldn't set target for remote simulator."
|
||||||
|
cleanup
|
||||||
|
gdb_exit
|
||||||
|
}
|
||||||
-re "Remote debugging using.*$gdb_prompt" {
|
-re "Remote debugging using.*$gdb_prompt" {
|
||||||
verbose "Set target to sid"
|
verbose "Set target to sid"
|
||||||
}
|
}
|
||||||
timeout {
|
timeout {
|
||||||
perror "Couldn't set target for remote simulator."
|
perror "Couldn't set target for remote simulator."
|
||||||
cleanup
|
cleanup
|
||||||
exit $exit_status
|
gdb_exit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
set timeout $prev_timeout
|
set timeout $prev_timeout
|
||||||
|
@ -164,6 +169,7 @@ proc gdb_load { arg } {
|
||||||
global loadfile
|
global loadfile
|
||||||
global GDB
|
global GDB
|
||||||
global gdb_prompt
|
global gdb_prompt
|
||||||
|
global retval
|
||||||
|
|
||||||
gdb_unload
|
gdb_unload
|
||||||
if [gdb_file_cmd $arg] then { return -1 }
|
if [gdb_file_cmd $arg] then { return -1 }
|
||||||
|
@ -175,24 +181,32 @@ proc gdb_load { arg } {
|
||||||
set timeout 2400
|
set timeout 2400
|
||||||
verbose "Timeout is now $timeout seconds" 2
|
verbose "Timeout is now $timeout seconds" 2
|
||||||
gdb_expect {
|
gdb_expect {
|
||||||
|
-re ".*\[Ee\]rror.*$gdb_prompt $" {
|
||||||
|
if $verbose>1 then {
|
||||||
|
perror "Error during download."
|
||||||
|
}
|
||||||
|
set retval -1;
|
||||||
|
}
|
||||||
-re ".*$gdb_prompt $" {
|
-re ".*$gdb_prompt $" {
|
||||||
if $verbose>1 then {
|
if $verbose>1 then {
|
||||||
send_user "Loaded $arg into $GDB\n"
|
send_user "Loaded $arg into $GDB\n"
|
||||||
}
|
}
|
||||||
set timeout 30
|
set retval 1;
|
||||||
verbose "Timeout is now $timeout seconds" 2
|
|
||||||
return 1
|
|
||||||
}
|
}
|
||||||
-re "$gdb_prompt $" {
|
-re "$gdb_prompt $" {
|
||||||
if $verbose>1 then {
|
if $verbose>1 then {
|
||||||
perror "GDB couldn't load."
|
perror "GDB couldn't load."
|
||||||
}
|
}
|
||||||
|
set retval -1;
|
||||||
}
|
}
|
||||||
timeout {
|
timeout {
|
||||||
if $verbose>1 then {
|
if $verbose>1 then {
|
||||||
perror "Timed out trying to load $arg."
|
perror "Timed out trying to load $arg."
|
||||||
}
|
}
|
||||||
|
set retval -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
set timeout $prev_timeout
|
set timeout $prev_timeout
|
||||||
|
verbose "Timeout is now $timeout seconds" 2
|
||||||
|
return $retval;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue