aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/lib
diff options
context:
space:
mode:
authorBob Manson <manson@cygnus>1997-06-17 00:08:20 +0000
committerBob Manson <manson@cygnus>1997-06-17 00:08:20 +0000
commit77f3ac77b541865ccd33567adb0c3c988cb60625 (patch)
treebffa6548656444d55fd178d219925f02c57bfd02 /gdb/testsuite/lib
parentc1292d9ba94dc8e062adf128b414a80bc4635d84 (diff)
downloadgdb-77f3ac77b541865ccd33567adb0c3c988cb60625.zip
gdb-77f3ac77b541865ccd33567adb0c3c988cb60625.tar.gz
gdb-77f3ac77b541865ccd33567adb0c3c988cb60625.tar.bz2
* lib/gdb.exp: Close connection to remote host if gdb doesn't
initialize. (default_gdb_init): New procedure; allow gdb_init to be overridden by a target configuration file. (gdb_expect): Pass the timeout to remote_expect. * config/dos.exp(dos_wait): Add timeout parameter. * lib/remote.exp(remote_expect): Add timeout parameter. (remote_wait): Ditto. (standard_wait): Ditto. Also give up if the program outputs more than 512,000 bytes. * config/vxworks.exp: Use timeout parameter instead of setting timeout variable. * config/dos.exp: Ditto. * config/ddb.exp: Ditto. * lib/mondfe.exp: Ditto. * lib/rlogin.exp: Ditto. * lib/telnet.exp: Ditto. * config/base68k.exp: Ditto. * config/i386-bozo.exp: Ditto. * config/gdb-comm.exp: Ditto. * config/gdb_stub.exp: Ditto. * config/i960.exp: Ditto. * config/ddb-ether.exp: Ditto. * config/sim.exp: Ditto. * lib/g++.exp(g++_init): Use g++_include_flags instead of making up the includes ourselves.
Diffstat (limited to 'gdb/testsuite/lib')
-rw-r--r--gdb/testsuite/lib/gdb.exp12
1 files changed, 9 insertions, 3 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 0a44f6d..1c828bf 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -198,6 +198,8 @@ proc gdb_run_cmd {args} {
-re "No symbol.*context.*$gdb_prompt $" {}
-re "The program is not being run.*$gdb_prompt $" {
gdb_load "";
+ send_gdb "jump *$start\n";
+ exp_continue;
}
timeout { perror "Jump to start() failed (timeout)"; return }
}
@@ -739,8 +741,8 @@ proc default_gdb_start { } {
return -1
}
timeout {
-
perror "(timeout) GDB never initialized after $timeout seconds."
+ remote_close host;
return -1
}
}
@@ -865,7 +867,7 @@ proc gdb_expect { args } {
set timeout [target_info gdb,timeout];
}
}
- set code [catch {uplevel remote_expect host $args} string];
+ set code [catch {uplevel remote_expect host $timeout $args} string];
if [target_info exists gdb,timeout] {
if [info exists oldt] {
set timeout $oldt
@@ -940,7 +942,7 @@ proc gdb_continue { function } {
return [gdb_test "continue" ".*Breakpoint $decimal, $function .*" "continue to $function"];
}
-proc gdb_init { args } {
+proc default_gdb_init { args } {
gdb_stop_suppressing_tests;
# Uh, this is lame. Really, really, really lame. But there's this *one*
@@ -957,6 +959,10 @@ proc gdb_init { args } {
}
}
+proc gdb_init { args } {
+ return [default_gdb_init];
+}
+
proc gdb_finish { } {
gdb_exit;
}