Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Phil Muldoon <pmuldoon@redhat.com>
To: gdb-patches@sourceware.org
Subject: [patch] gdb_unload - account for another termination message
Date: Tue, 15 Mar 2011 12:51:00 -0000	[thread overview]
Message-ID: <m3mxkwejog.fsf@redhat.com> (raw)


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


             reply	other threads:[~2011-03-15 10:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-15 12:51 Phil Muldoon [this message]
2011-03-15 13:42 ` Pedro Alves
2011-03-15 14:06   ` Phil Muldoon
2011-03-15 14:25     ` Pedro Alves
2011-03-15 17:38       ` Phil Muldoon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3mxkwejog.fsf@redhat.com \
    --to=pmuldoon@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox