From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3898 invoked by alias); 4 Mar 2014 16:53:01 -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 3889 invoked by uid 89); 4 Mar 2014 16:53:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,KAM_STOCKGEN,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mtaout22.012.net.il Received: from mtaout22.012.net.il (HELO mtaout22.012.net.il) (80.179.55.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 04 Mar 2014 16:52:59 +0000 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0N1X00M0086HMQ00@a-mtaout22.012.net.il> for gdb-patches@sourceware.org; Tue, 04 Mar 2014 18:52:56 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N1X00MQ7887MC00@a-mtaout22.012.net.il>; Tue, 04 Mar 2014 18:52:56 +0200 (IST) Date: Tue, 04 Mar 2014 16:53:00 -0000 From: Eli Zaretskii Subject: Re: [PATCH 3/3] gdb/doc/python.texi: documented gdb.SYMBOL_LOC_LABEL. Added notion on possible exception thrown from symbol object .value() method In-reply-to: <1393929360-31299-4-git-send-email-satori@yandex-team.ru> To: Maxim Bublis Cc: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83eh2hsy77.fsf@gnu.org> References: <1393929360-31299-1-git-send-email-satori@yandex-team.ru> <1393929360-31299-4-git-send-email-satori@yandex-team.ru> X-IsSubscribed: yes X-SW-Source: 2014-03/txt/msg00077.txt.bz2 > From: Maxim Bublis > Cc: Maxim Bublis > Date: Tue, 4 Mar 2014 14:36:00 +0400 > > +2014-03-04 Maxim Bublis > + > + * gdb/doc/python.texi (Symbols In Python): Document gdb.SYMBOL_LOC_LABEL > + address class. Added notion on possible exception thrown from .value() ^^ Two spaces between sentences, please. Also, please don't attach "()" to function and method name to signal they are function, that's against GNU Coding Standards (it looks like a call to a function with no arguments, which is not what you want to say). > --- a/gdb/doc/python.texi > +++ b/gdb/doc/python.texi > @@ -3544,7 +3544,10 @@ functions, this computes the address of the function, cast to the > appropriate type. If the symbol requires a frame in order to compute > its value, then @var{frame} must be given. If @var{frame} is not > given, or if @var{frame} is invalid, then this method will throw an > -exception. > +exception. For symbols with some address classes it is not possible > +to compute value (eg. @code{gdb.SYMBOL_LOC_TYPEDEF} or > +@code{gdb.SYMBOL_LOC_LABEL}), in this case exception will > +be thrown. Please try to minimize the use of passive tense, it makes the text longer and slightly less clear. In this case, I suggest to rephrase: This method will also throw an exception for symbols for which it is not possible to compute the value, such as @code{gdb.SYMBOL_LOC_TYPEDEF} or @code{gdb.SYMBOL_LOC_LABEL}. The documentation patch is OK with those changes. I have a question regarding the last part: is it wise to throw an exception when a symbol has no value? how about returning None instead?