From patchwork Wed Mar 4 21:44:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 5461 Received: (qmail 3454 invoked by alias); 4 Mar 2015 21:44:43 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 3420 invoked by uid 89); 4 Mar 2015 21:44:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 X-HELO: usevmg21.ericsson.net Received: from usevmg21.ericsson.net (HELO usevmg21.ericsson.net) (198.24.6.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 04 Mar 2015 21:44:39 +0000 Received: from EUSAAHC004.ericsson.se (Unknown_Domain [147.117.188.84]) by usevmg21.ericsson.net (Symantec Mail Security) with SMTP id 6F.35.19660.3EB17F45; Wed, 4 Mar 2015 15:51:15 +0100 (CET) Received: from elxcz23q12-y4.mo.ca.am.ericsson.se (147.117.188.8) by smtps-am.internal.ericsson.com (147.117.188.84) with Microsoft SMTP Server (TLS) id 14.3.210.2; Wed, 4 Mar 2015 16:44:37 -0500 From: Simon Marchi To: CC: Simon Marchi Subject: [PATCH] Accept all-stop alternative in mi_expect_interrupt Date: Wed, 4 Mar 2015 16:44:33 -0500 Message-ID: <1425505473-20729-1-git-send-email-simon.marchi@ericsson.com> MIME-Version: 1.0 X-IsSubscribed: yes When interrupting a thread in non-stop vs all-stop, the signal given in the MI *stopped event is not the same. Currently, mi_expect_interrupt only accepts the case for non-stop, so this adds the alternative for all-stop. gdb/testsuite/ChangeLog: * lib/mi-support.exp (mi_expect_interrupt): Accept alternative event for when in all-stop mode. --- gdb/testsuite/lib/mi-support.exp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp index 20546f6..b8f6334 100644 --- a/gdb/testsuite/lib/mi-support.exp +++ b/gdb/testsuite/lib/mi-support.exp @@ -1195,14 +1195,14 @@ proc mi_expect_interrupt { test } { set prompt_re "$mi_gdb_prompt$" } - set r "reason=\"signal-received\",signal-name=\"0\",signal-meaning=\"Signal 0\"" - + set r_nonstop "reason=\"signal-received\",signal-name=\"0\",signal-meaning=\"Signal 0\"" + set r_allstop "reason=\"signal-received\",signal-name=\"SIGINT\",signal-meaning=\"Interrupt\"" set any "\[^\n\]*" # A signal can land anywhere, just ignore the location - verbose -log "mi_expect_interrupt: expecting: \\*stopped,${r}$any\r\n$prompt_re" + verbose -log "mi_expect_interrupt: expecting: \\*stopped,(${r_nonstop}|${r_allstop})$any\r\n$prompt_re" gdb_expect { - -re "\\*stopped,${r}$any\r\n$prompt_re" { + -re "\\*stopped,(${r_nonstop}|${r_allstop})$any\r\n$prompt_re" { pass "$test" return 0 }