From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10438 invoked by alias); 25 Jun 2013 19:10:01 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 10428 invoked by uid 89); 25 Jun 2013 19:10:00 -0000 X-Spam-SWARE-Status: No, score=-4.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,SPF_PASS autolearn=ham version=3.3.1 Received: from usevmg20.ericsson.net (HELO usevmg20.ericsson.net) (198.24.6.45) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 25 Jun 2013 19:09:59 +0000 Received: from EUSAAHC004.ericsson.se (Unknown_Domain [147.117.188.84]) by usevmg20.ericsson.net (Symantec Mail Security) with SMTP id 74.7F.29608.50BE9C15; Tue, 25 Jun 2013 21:09:57 +0200 (CEST) Received: from eusaamw0711.eamcs.ericsson.se (147.117.20.178) by EUSAAHC004.ericsson.se (147.117.188.84) with Microsoft SMTP Server (TLS) id 14.2.328.9; Tue, 25 Jun 2013 15:09:57 -0400 Received: from [142.133.110.167] (147.117.20.214) by smtps-am.internal.ericsson.com (147.117.20.178) with Microsoft SMTP Server (TLS) id 8.3.279.1; Tue, 25 Jun 2013 15:09:56 -0400 Message-ID: <51C9EB04.1090206@ericsson.com> Date: Tue, 25 Jun 2013 19:13:00 -0000 From: Simon Marchi User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 MIME-Version: 1.0 To: GDB Patches Subject: =?ISO-8859-1?Q?=5BPATCH=5D=A0Fix_mi=5Fexpect=5Fstop_for_no?= =?ISO-8859-1?Q?n-zero_exit_codes?= Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-SW-Source: 2013-06/txt/msg00737.txt.bz2 The message is a different when the inferior exits with zero and non-zero values, this fix takes that into account. I split the following patch in two distinct patches: http://sourceware.org/ml/gdb-patches/2013-06/msg00374.html gdb/testsuite/ChangeLog: 2013-06-25 Simon Marchi * lib/mi-support.exp (mi_expect_stop): Expect message for inferiors that exit with non-zero exit code. Also, remove useless whitespace just above. --- gdb/testsuite/lib/mi-support.exp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp index 86a0fd6..b3a9de7 100644 --- a/gdb/testsuite/lib/mi-support.exp +++ b/gdb/testsuite/lib/mi-support.exp @@ -1040,7 +1040,7 @@ proc mi_expect_stop { reason func args file line extra test } { } return } - + if { $reason == "exited-normally" } { gdb_expect { @@ -1055,6 +1055,21 @@ proc mi_expect_stop { reason func args file line extra test } { return } + if { $reason == "exited" } { + gdb_expect { + -re "\\*stopped,reason=\"exited\",exit-code=\"\[0-7\]+\"\r\n$prompt_re" { + pass "$test" + } + -re ".*$mi_gdb_prompt$" { + fail "$test (inferior not stopped)" + } + timeout { + fail "$test (unknown output after running)" + } + } + return + } + set args "\\\[$args\\\]" set bn ""