From: Bob Manson Date: Fri, 31 Jan 1997 00:51:45 +0000 (+0000) Subject: * lib/gdb.exp(default_gdb_exit): Add a catch to the X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=83b1cc25d102625b379de9b65b54cd727ae49333;p=binutils-gdb.git * 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. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index d317dc34890..8bf1be6445e 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +Thu Jan 30 16:49:25 1997 Bob Manson + + * 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 Major rewrite for testsuite revision. diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 88894927bac..e6d86f25a47 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 }