From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6538 invoked by alias); 3 Apr 2012 18:33:33 -0000 Received: (qmail 6529 invoked by uid 22791); 3 Apr 2012 18:33:31 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 03 Apr 2012 18:33:18 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q33IXGJt028556 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 3 Apr 2012 14:33:16 -0400 Received: from host2.jankratochvil.net (ovpn-116-28.ams2.redhat.com [10.36.116.28]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q33IXBsb003211 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Tue, 3 Apr 2012 14:33:15 -0400 Date: Tue, 03 Apr 2012 18:33:00 -0000 From: Jan Kratochvil To: Eli Zaretskii Cc: gdb-patches@sourceware.org Subject: Re: [patch#2 3/6] set auto-load local-gdbinit warn-and-* Message-ID: <20120403183311.GB13483@host2.jankratochvil.net> References: <20120329091258.GD25449@host2.jankratochvil.net> <83hax61rey.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83hax61rey.fsf@gnu.org> User-Agent: Mutt/1.5.21 (2010-09-15) 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: 2012-04/txt/msg00036.txt.bz2 On Fri, 30 Mar 2012 09:25:41 +0200, Eli Zaretskii wrote: > > If enabled, canned sequences of commands are loaded when debugger starts\n\ > > from .gdbinit file in current directory. Such files are deprecated,\n\ > > use script associated with inferior executable file instead.\n\ > ^^^^^^^^^^ > Either "use a script" or "use scripts", probably the former. Use "use a script" (it is in [patch 2/X]). > > +This feature is deprecated, please use @ref{objfile-gdb.rc file} instead; > > "objfile" should be in @var, and it should explain what is "objfile". Added: This feature is deprecated, please use @ref{@var{objfile}-gdb.gdb file} instead. The canned sequence of commands will be then specific for loaded @var{objfile}---typically the main executable---after converting an init file in the current directory into the @var{objfile}-gdb.gdb file.. > > gdb-scripts: Canned sequences of commands auto-loading is on. > > libthread-db: Inferior specific libthread_db auto-loading is on. > > -local-gdbinit: Current directory .gdbinit script auto-loading is on. > > +local-gdbinit: Current directory .gdbinit script auto-loading is yes. > > Why "yes"? parse_binary_operation accepts any of 'on', '1', 'yes' or 'enable' (and sure off/0/no/disable). It then displays the boolean only as "on" and "off". Somehow it seems more appropriate for these auto-loading settings to use yes/no instead of on/off. This is also why I use yes/no in the documentation. When I added the warning option I had to choose only one pair, therefore I chose yes/no. But this means the default displayed boolean values are new yes/no (and not on/off). It also means it no longer accepts the alternative words on/1/enable (and off/0/disable); but that is not a real regression when the setting never existed before this patchset. There are two possibilities: * Introduce new option some "set local-gdbinit-warning " as suggested by Doug IIUC and technically keep everything boolean. * Switch the words used in documentation from yes/no to on/off, therefore also make the switch on/off/warn-and-on/warn-and-off. Thanks, Jan