From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21648 invoked by alias); 16 Jun 2013 06:30:15 -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 21595 invoked by uid 89); 16 Jun 2013 06:30:10 -0000 X-Spam-SWARE-Status: No, score=-4.5 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.1 Received: from mail-vc0-f174.google.com (HELO mail-vc0-f174.google.com) (209.85.220.174) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Sun, 16 Jun 2013 06:30:08 +0000 Received: by mail-vc0-f174.google.com with SMTP id kw10so1289938vcb.5 for ; Sat, 15 Jun 2013 23:30:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=YyNxn55WOM/DYM7Pi2bL5JrgYXmvLylX8Toj+qKgaXQ=; b=EsbHXE1f5/O3Kz1UA2s+9gCu7HfzvyK6DRrHxFV2FpQ7ShnnBNB6SOLKysiGF6eXBp I7VSQ0Qgu3txzPjashLeio66Ee3E7a0g7JbGfowruoj2c57s22c9i9Kf6e7+7YraVtlG HiqhlgkV9wjJm/VZC0UzaRJN5Z45eMhx2loghhKZwQY6vmf4qk/Y/Ixy6uZd0iSx/wH+ 9fluZNLJQyh17C3bYYzRs1UKTPhdYwzIXSgZCBo+v07vBvqWjm5qcakFZ2NFiyKFSqnb qmrhLZvOkNAJv+VOYJ7a7zSPre50T+sqP07k2sluyFAdm5JDlJHh3HwWlUqaK2MC8NYF hYAA== MIME-Version: 1.0 X-Received: by 10.58.235.69 with SMTP id uk5mr3006632vec.17.1371364206897; Sat, 15 Jun 2013 23:30:06 -0700 (PDT) Received: by 10.220.189.74 with HTTP; Sat, 15 Jun 2013 23:30:06 -0700 (PDT) In-Reply-To: References: Date: Sun, 16 Jun 2013 16:22:00 -0000 Message-ID: Subject: Re: [RFC/PATCH] New convenience variable $_exitsignal From: Doug Evans To: Sergio Durigan Junior Cc: GDB Patches , Pedro Alves Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQmxRXPRTc+fVKVzPRvnwknf3xp+TgbQ5EuBskb7uYxaUpSRbSFy1TNcw3kk0Hkt45bBAoC91dyD/4MtGm7EellRtvzczjjwk/dUOzMzcc6cgnZcBn28IJ1fdWL7LNiTcK8c/B2cXABIwqjKk1SLhbP85OikEZQ5x1CA7YD1WYbeDlv1OPAmp6dB3J3M8Rw9zmwBWpFaNaQx5R3fZLS2q+YRkppf8Q== X-SW-Source: 2013-06/txt/msg00354.txt.bz2 On Sat, Jun 15, 2013 at 11:25 PM, Sergio Durigan Junior wrote: > This patch was proposed by Pedro at: > > > > It adds a new convenience variable called "$_exitsignal", which will > hold the signal number when the inferior terminates due to the uncaught > signal. > > I've made modifications on infrun.c:handle_inferior_event such that > $_exitcode gets cleared when the inferior signalled, and vice-versa. > This assumption was made because IMO the variables are mutually > exclusive, i.e., when the inferior terminates because of an uncaught > signal it is not possible for it to return. Anyway, Pedro's explanation > seems to follow the same logic. > > The patch also adds a NEWS entry, documentation bits, and a testcase. > > OK to apply? Hi. I'd like the documentation to explain how it's intended that the two (exitcode/exitsignal) are intended to be used together. E.g., how does one know which one has a useful value? > gdb/ChangeLog: > 2013-06-16 Sergio Durigan Junior > > * NEWS: Mention new convenience variable "$_exitsignal". > * infrun.c (handle_inferior_event): Set internal variable > "$_exitsignal" for TARGET_WAITKIND_SIGNALLED and clear > "$_exitcode", vice-versa for TARGET_WAITKIND_STOPPED.