This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch#2 3/6] set auto-load local-gdbinit warn-and-*
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 05 Apr 2012 19:15:03 +0300
- Subject: Re: [patch#2 3/6] set auto-load local-gdbinit warn-and-*
- References: <20120329091258.GD25449@host2.jankratochvil.net> <83hax61rey.fsf@gnu.org> <20120403183311.GB13483@host2.jankratochvil.net>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Tue, 3 Apr 2012 20:33:11 +0200
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
> Cc: gdb-patches@sourceware.org
>
> > > +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..
Sorry, the @var inside @ref is wrong, please revert that part.
> > > 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".
But this hunk changes "on" into "yes", which is not what you seem to
say will happen. Did I understand correctly that GDB will print "on"?
> 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 <boolean>" 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.
Whatever we do, I think these options should behave consistently.