This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch] gdb_unload - account for another termination message
- From: Phil Muldoon <pmuldoon at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Tue, 15 Mar 2011 10:56:31 +0000
- Subject: [patch] gdb_unload - account for another termination message
- Reply-to: pmuldoon at redhat dot com
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