From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3246 invoked by alias); 15 Feb 2011 18:24:47 -0000 Received: (qmail 3238 invoked by uid 22791); 15 Feb 2011 18:24:46 -0000 X-SWARE-Spam-Status: No, hits=-0.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout23.012.net.il (HELO mtaout23.012.net.il) (80.179.55.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 15 Feb 2011 18:24:39 +0000 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0LGO00600881TO00@a-mtaout23.012.net.il> for gdb-patches@sourceware.org; Tue, 15 Feb 2011 20:24:37 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.124.192.4]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LGO006AW8GW9BD0@a-mtaout23.012.net.il>; Tue, 15 Feb 2011 20:24:33 +0200 (IST) Date: Tue, 15 Feb 2011 18:28:00 -0000 From: Eli Zaretskii Subject: Re: [patch] Implement set/show callback functions in gdb.Parameter In-reply-to: To: pmuldoon@redhat.com Cc: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83bp2dp34s.fsf@gnu.org> References: X-IsSubscribed: yes 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 X-SW-Source: 2011-02/txt/msg00329.txt.bz2 > From: Phil Muldoon > Date: Tue, 15 Feb 2011 16:24:47 +0000 > > > This patch allows the user to implement two methods in the gdb.Parameter > object. Thanks. > +There are two methods that should be implemented in any Parameter > +class. These are: "Parameter" should be in @code, since it is a Python symbol. > +@defop Operation {parameter} get_set_string (self) The @def... commands in Texinfo don't use parentheses to enclose argument. Just use @defop Operation {parameter} get_set_string self > +@value{GDBN} will call this method when a parameter has been > +invoked via the set API (for example, set foo off). The @code{value} Are talking here about a Python API or about the CLI command "set"? "set" should be in @code in both cases. "set foo off" should be in @kbd if it's about a CLI command; if it is about a Python API, I'm not sure I understand what it means. Similar issues with get_show_string. > + The argument > +@code{svalue} contains a string representing what @value{GDBN} has > +stored for this parameter. Suggest to rephrase: The argument @code{svalue} receives the string representation of the current value. > This method must return a string. You mean, in `svalue'? If so, "return" is not really appropriate, is it? If you mean something else, then I think we should elaborate about that. Thanks.