From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14914 invoked by alias); 14 Apr 2014 07:41:19 -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 14905 invoked by uid 89); 14 Apr 2014 07:41:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.5 required=5.0 tests=AWL,BAYES_00,KAM_STOCKGEN,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 14 Apr 2014 07:41:16 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s3E7fEV1025462 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 14 Apr 2014 03:41:14 -0400 Received: from localhost.localdomain (ovpn-112-35.ams2.redhat.com [10.36.112.35]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s3E7fC1o000375; Mon, 14 Apr 2014 03:41:13 -0400 Message-ID: <534B9118.9010307@redhat.com> Date: Mon, 14 Apr 2014 07:41:00 -0000 From: Phil Muldoon MIME-Version: 1.0 To: Maxim Bublis , gdb-patches@sourceware.org Subject: Re: [PATCH v2 2/3] gdb/python: raise TypeError instead of abort on calling value method for label symbol object References: <1394026864-4691-1-git-send-email-satori@yandex-team.ru> <1394026864-4691-2-git-send-email-satori@yandex-team.ru> In-Reply-To: <1394026864-4691-2-git-send-email-satori@yandex-team.ru> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-04/txt/msg00251.txt.bz2 On 05/03/14 13:41, Maxim Bublis wrote: > --- > gdb/ChangeLog | 6 ++++++ > gdb/python/py-symbol.c | 6 ++++++ > 2 files changed, 12 insertions(+) > > diff --git a/gdb/ChangeLog b/gdb/ChangeLog > index 8108e50..19ec13c 100644 > --- a/gdb/ChangeLog > +++ b/gdb/ChangeLog > @@ -1,3 +1,9 @@ > +2014-03-05 Maxim Bublis > + > + * gdb/python/py-symbol.c (sympy_value): Throw TypeError exception > + instead of abort on calling value method for > + symbol object with SYMBOL_LOC_LABEL address class. > + > 2014-03-05 Mike Frysinger > > * remote-sim.c (gdbsim_load): Add const to prog. > diff --git a/gdb/python/py-symbol.c b/gdb/python/py-symbol.c > index 6900d58..6303cea 100644 > --- a/gdb/python/py-symbol.c > +++ b/gdb/python/py-symbol.c > @@ -262,6 +262,12 @@ sympy_value (PyObject *self, PyObject *args) > return NULL; > } > > + if (SYMBOL_CLASS (symbol) == LOC_LABEL) > + { > + PyErr_SetString (PyExc_TypeError, "It is not possible to compute the value of a label."); > + return NULL; > + } I am really curious about the sigabort you were seeing. Without it I cannot tell if there is a deeper problem in GDB, which this patch would be papering over. Can you provide the backtrace? Cheers Phil