aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorBob Manson <manson@cygnus>1997-01-31 00:51:45 +0000
committerBob Manson <manson@cygnus>1997-01-31 00:51:45 +0000
commit83b1cc25d102625b379de9b65b54cd727ae49333 (patch)
treee86f4832e854c2dcfb5ce60e62efd40b9d020b0e /gdb
parent0d7f9025b93665f88f0d3d1dcf412aca14a2a63e (diff)
downloadgdb-83b1cc25d102625b379de9b65b54cd727ae49333.zip
gdb-83b1cc25d102625b379de9b65b54cd727ae49333.tar.gz
gdb-83b1cc25d102625b379de9b65b54cd727ae49333.tar.bz2
* lib/gdb.exp(default_gdb_exit): Add a catch to the
close and wait commands, as the descriptor may now be invalid. Always call "remote_close host". Makes sure things get cleaned up if gdb dies in the middle of a test.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog6
-rw-r--r--gdb/testsuite/lib/gdb.exp6
2 files changed, 9 insertions, 3 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index d317dc3..8bf1be6 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+Thu Jan 30 16:49:25 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/gdb.exp(default_gdb_exit): Add a catch to the
+ close and wait commands, as the descriptor may now be
+ invalid. Always call "remote_close host".
+
Tue Jan 28 14:42:31 1997 Bob Manson <manson@charmed.cygnus.com>
Major rewrite for testsuite revision.
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 8889492..e6d86f2 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -594,17 +594,17 @@ proc default_gdb_exit {} {
}
-i $gdb_spawn_id timeout { }
}
- remote_close host;
} else {
# We used to try to send_gdb "quit" to GDB, and wait for it to die.
# Dealing with all the cases and errors got pretty hairy. Just close it,
# that is simpler.
- close -i $gdb_spawn_id
+ catch "close -i $gdb_spawn_id"
# Omitting this probably would cause strange timing-dependent failures.
- wait -i $gdb_spawn_id
+ catch "wait -i $gdb_spawn_id"
}
+ remote_close host;
unset gdb_spawn_id
}