From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9287 invoked by alias); 17 Jun 2013 17:28:59 -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 9274 invoked by uid 89); 17 Jun 2013 17:28:59 -0000 X-Spam-SWARE-Status: No, score=-8.0 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 17 Jun 2013 17:28:58 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r5HHSvPp030990 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 17 Jun 2013 13:28:57 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r5HHStrv022555; Mon, 17 Jun 2013 13:28:56 -0400 Message-ID: <51BF4757.8020900@redhat.com> Date: Mon, 17 Jun 2013 17:31:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6 MIME-Version: 1.0 To: Sergio Durigan Junior CC: GDB Patches Subject: Re: [RFC/PATCH] New convenience variable $_exitsignal References: <51BF4550.80704@redhat.com> In-Reply-To: <51BF4550.80704@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-06/txt/msg00387.txt.bz2 On 06/17/2013 06:20 PM, Pedro Alves wrote: > On 06/16/2013 07:25 AM, Sergio Durigan Junior wrote: >> @@ -3455,6 +3455,12 @@ handle_inferior_event (struct execution_control_state *ecs) >> set_internalvar_integer (lookup_internalvar ("_exitcode"), >> (LONGEST) ecs->ws.value.integer); >> >> + /* Clear the internal variable, since if we are here chances >> + are the inferior has not been terminated by a signal. >> + And even if it has, then GDB will get to >> + TARGET_WAITKIND_SIGNALLED in time... */ > > No it won't. The target either returns TARGET_WAITKIND_EXITED > or TARGET_WAITKIND_SIGNALLED. They're mutually exclusive. BTW, it'd be thorough if the test also exercised these clearings. That is, check that $_exitcode is cleared when the inferior terminates with a signal. Check that $_exitsignal is cleared when the inferior exits normally. -- Pedro Alves