* 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.
This commit is contained in:
Bob Manson 1997-01-31 00:51:45 +00:00
parent 0d7f9025b9
commit 83b1cc25d1
2 changed files with 9 additions and 3 deletions

View File

@ -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.

View File

@ -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
}