From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19047 invoked by alias); 17 Jul 2013 18:41:02 -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 19019 invoked by uid 89); 17 Jul 2013 18:41:02 -0000 X-Spam-SWARE-Status: No, score=-4.8 required=5.0 tests=AWL,BAYES_05,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RDNS_NONE,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.1 Received: from Unknown (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 17 Jul 2013 18:41:01 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r6HIerNs011102 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 17 Jul 2013 14:40:54 -0400 Received: from barimba (ovpn-113-128.phx2.redhat.com [10.3.113.128]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r6HIeqmk015554 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 17 Jul 2013 14:40:53 -0400 From: Tom Tromey To: Sergio Durigan Junior Cc: GDB Patches Subject: Re: [RFC/PATCH] Add new internal variable $_signo References: Date: Wed, 17 Jul 2013 18:41:00 -0000 In-Reply-To: (Sergio Durigan Junior's message of "Thu, 13 Jun 2013 21:37:59 -0300") Message-ID: <87bo61f2rv.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2013-07/txt/msg00412.txt.bz2 >>>>> "Sergio" == Sergio Durigan Junior writes: Sergio> Basically, the ABRT project () wants Sergio> to be able to perform some analysis on corefiles (to be implemented as a Sergio> Python GDB module) and for that it needs to be able to inspect the Sergio> signal which killed the program being investigated. I read through this thread. It was very informative. If you are not planning to tackle all the items Pedro pointed out, would you mind filing bugs for the ones you are not planning to do? Sergio> (gdb) core ./coredump Sergio> [New LWP 2703] Sergio> Core was generated by `/usr/bin/gnote <>'. Sergio> Program terminated with signal 11, Segmentation fault. Sergio> #0 0x09fa5348 in ?? () Sergio> (gdb) print $_siginfo.si_signo Sergio> Unable to read siginfo One other idea that occurs to me is that, in this situation, $_siginfo could yield a value where only the si_signo bits are available. We've already got all the machinery needed to make this work. TBH I'm not sure if this idea is clever and simple, or obscure and hard to use. The one major benefit, I think, would be that scripts could simply use $_siginfo.si_signo unconditionally. Tom