aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog6
-rw-r--r--gdb/testsuite/lib/gdb.exp12
2 files changed, 15 insertions, 3 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index a789a0a..e4d2dfa 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,11 @@
Sat Jun 14 09:23:26 1997 Bob Manson <manson@charmed.cygnus.com>
+ * 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/monitor.exp(gdb_load): Fix typo in regexp.
Thu Jun 12 20:57:12 1997 Bob Manson <manson@charmed.cygnus.com>
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;
}