From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31978 invoked by alias); 26 Jun 2002 18:23:41 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 31960 invoked from network); 26 Jun 2002 18:23:38 -0000 Received: from unknown (HELO gash2.peakpeak.com) (207.174.178.17) by sources.redhat.com with SMTP; 26 Jun 2002 18:23:38 -0000 Received: from fleche.redhat.com (ta0196.peakpeak.com [204.144.244.196]) by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id MAA13909; Wed, 26 Jun 2002 12:23:26 -0600 Received: by fleche.redhat.com (Postfix, from userid 1000) id 86EA74F80AA; Wed, 26 Jun 2002 12:36:13 -0600 (MDT) To: Eli Zaretskii Cc: gdb-patches@sources.redhat.com Subject: Re: RFA: add_setshow_cmd_full References: From: Tom Tromey Reply-To: tromey@redhat.com X-Attribution: Tom X-Zippy: I like the IMPUDENT NOSE on that car.. Are you a TEEN-AGER? Date: Wed, 26 Jun 2002 11:23:00 -0000 In-Reply-To: Message-ID: <87lm91evky.fsf@fleche.redhat.com> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-06/txt/msg00543.txt.bz2 >>>>> "Eli" == Eli Zaretskii writes: Eli> Sounds good, but could you please add this function to Eli> gdbint.texinfo? Assuming Andrew approves my most recent patch in this area, what do you think of the appended documentation patch? I didn't list the arguments as the other entries don't seem to, and anyway they are documented in the source. In Java it is standard to extract special comments in the source and use those to construct API documentation. I know a long time ago gdb did this, but it was abandoned. Anyway, wouldn't it be simpler to keep the docs up to date with something like this in place? Tom Index: ChangeLog from Tom Tromey * gdbint.texinfo (User Interface): Mention add_setshow_cmd and add_setshow_cmd_full. Index: gdbint.texinfo =================================================================== RCS file: /cvs/src/src/gdb/doc/gdbint.texinfo,v retrieving revision 1.91 diff -u -r1.91 gdbint.texinfo --- gdbint.texinfo 9 Jun 2002 17:15:40 -0000 1.91 +++ gdbint.texinfo 26 Jun 2002 18:13:36 -0000 @@ -50,7 +50,7 @@ @end tex @vskip 0pt plus 1filll -Copyright @copyright{} 1990,1991,1992,1993,1994,1996,1998,1999,2000,2001 +Copyright @copyright{} 1990,1991,1992,1993,1994,1996,1998,1999,2000,2001, 2002 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document @@ -721,6 +721,14 @@ the main command list, and should be used for those commands. The usual place to add commands is in the @code{_initialize_@var{xyz}} routines at the ends of most source files. + +@findex add_setshow_cmd +@findex add_setshow_cmd_full +To add paired @samp{set} and @samp{show} commands, use +@code{add_setshow_cmd} or @code{add_setshow_cmd_full}. The former is +a slightly simpler interface which is useful when you don't need to +further modify the new command structures, while the latter returns +the new command structures for manipulation. @cindex deprecating commands @findex deprecate_cmd