From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32479 invoked by alias); 4 Mar 2014 17:57:28 -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 32466 invoked by uid 89); 4 Mar 2014 17:57:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.0 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; Tue, 04 Mar 2014 17:57:26 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s24HvOw3021156 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 4 Mar 2014 12:57:24 -0500 Received: from localhost.localdomain (ovpn-112-30.ams2.redhat.com [10.36.112.30]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s24HvMoK014096; Tue, 4 Mar 2014 12:57:23 -0500 Message-ID: <53161401.5080408@redhat.com> Date: Tue, 04 Mar 2014 17:57:00 -0000 From: Phil Muldoon MIME-Version: 1.0 To: Maxim Bublis , gdb-patches@sourceware.org Subject: Re: [PATCH 2/3] gdb/python: raise TypeError instead of abort() on calling .value() method for label symbol object References: <1393929360-31299-1-git-send-email-satori@yandex-team.ru> <1393929360-31299-3-git-send-email-satori@yandex-team.ru> In-Reply-To: <1393929360-31299-3-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-03/txt/msg00080.txt.bz2 On 04/03/14 10:35, Maxim Bublis wrote: > > + if (SYMBOL_CLASS (symbol) == LOC_LABEL) > + { > + PyErr_SetString (PyExc_TypeError, "cannot get the value of a label"); Error text should be complete sentences with punctuation and proper capitalization (I know there are a few in the code base that aren't, but we'll get them all eventually). > + return NULL; > + } > + > TRY_CATCH (except, RETURN_MASK_ALL) > { > if (frame_obj != NULL) This patch looks fine to me apart from one further small aside (please wait for a maintainer to approve your patch, regardless). In the documentation you note there are other types of symbol that can produce this error: e.g., SYMBOL_LOC_TYPEDEF. Can you please audit and include checks for all, while you are there? I noticed only the explicit LOC_LABEL check in the patch above. Cheers, Phil