[patch] gdb_unload - account for another termination message

Phil Muldoon pmuldoon@redhat.com
Tue Mar 15 12:51:00 GMT 2011


While working on another bug I attempted to use gdb_unload in the
testsuite.  I noticed that it did not account for a termination
message. (This was the one message I was getting).  This would lead to a
timeout and failure.   Is it ok to just add another -re test in the
original test here?

Cheers

Phil

2011-03-15  Phil Muldoon  <pmuldoon@redhat.com>

	* lib/gdb.exp (gdb_unload): Add another termination case.

--

diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 1b601af..6cc8410 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -142,6 +142,11 @@ proc gdb_unload {} {
 		verbose "\t\tKilling previous program being debugged"
 	    exp_continue
 	}
+	-re "A program is being debugged already..*Are you sure.*y or n. $"\
+	    { send_gdb "y\n"
+		verbose "\t\tKilling previous program being debugged"
+	    exp_continue
+	}
 	-re "Discard symbol table from .*y or n.*$" {
 	    send_gdb "y\n"
 	    exp_continue



More information about the Gdb-patches mailing list