From: Bob Manson Date: Mon, 3 Feb 1997 20:36:39 +0000 (+0000) Subject: * gdb.base/a1-selftest.exp: Make sure we call gdb_exit before X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=94b25813b1c3d9dd173f5c16b810e167e242e688;p=binutils-gdb.git * gdb.base/a1-selftest.exp: Make sure we call gdb_exit before trying to delete the copy of gdb. Catch the file delete so we don't die if the delete fails; also, the file should be copied to the host, not to the build. Fixes problems when gdb isn't built with debugging. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 41b8f38b8ba..73e50957453 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,10 @@ +Mon Feb 3 12:09:37 1997 Bob Manson + + * gdb.base/a1-selftest.exp: Make sure we call gdb_exit before + trying to delete the copy of gdb. Catch the file delete so we + don't die if the delete fails; also, the file should be copied to + the host, not to the build. + Sun Feb 2 00:55:14 1997 Bob Manson * lib/gdb.exp(gdb_test): Surround the result pattern with diff --git a/gdb/testsuite/gdb.base/a1-selftest.exp b/gdb/testsuite/gdb.base/a1-selftest.exp index 35c86fb7db1..128e3021d7c 100644 --- a/gdb/testsuite/gdb.base/a1-selftest.exp +++ b/gdb/testsuite/gdb.base/a1-selftest.exp @@ -373,14 +373,12 @@ GDB.*Copyright \[0-9\]+ Free Software Foundation, Inc..*$gdb_prompt $"\ } } - gdb_exit # Set the timeout back to the value it had when we were called. set timeout $oldtimeout verbose "Timeout is now $timeout seconds" 2 # Restart gdb in case next test expects it to be started already. - gdb_start return 0 } @@ -414,12 +412,13 @@ proc find_gdb { arg } { set GDB_FULLPATH [find_gdb $GDB] # Remove any old copy lying around. -remote_file build delete x$tool +remote_file host delete x$tool gdb_start -set file [remote_download build $GDB_FULLPATH x$tool] +set file [remote_download host $GDB_FULLPATH x$tool] set result [test_with_self $file]; -remote_file build delete $file; +gdb_exit; +catch "remote_file host delete $file"; if {$result <0} then { warning "Couldn't test self"