This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [PATCH] util.c + doc [was Re: [RFC] Queries and frontends]
- From: nickrob at snap dot net dot nz (Nick Roberts)
- To: "Marc Khouzam" <marc dot khouzam at ericsson dot com>
- Cc: "Tom Tromey" <tromey at redhat dot com>, <gdb-patches at sourceware dot org>
- Date: Thu, 30 Jul 2009 16:40:26 +1200
- Subject: RE: [PATCH] util.c + doc [was Re: [RFC] Queries and frontends]
- References: <6D19CA8D71C89C43A057926FE0D4ADAA07C00023@ecamlmw720.eamcs.ericsson.se> <19045.23703.743876.775308@totara.tehura.co.nz> <m37hxwm3wr.fsf@fleche.redhat.com> <19053.2107.342469.683795@totara.tehura.co.nz> <m3iqheje2p.fsf@fleche.redhat.com> <19054.23189.193878.534661@totara.tehura.co.nz> <m3r5vztcpw.fsf@fleche.redhat.com> <19056.57733.247579.68268@totara.tehura.co.nz> <6D19CA8D71C89C43A057926FE0D4ADAA07CA09F1@ecamlmw720.eamcs.ericsson.se>
> Doesn't this amount to using "set confirm off"?
> I might have missed it, but I don't remember why you didn't want
> use that instead?
In the console, the user can type "set confirm on/off" according to his
preference. This change ensures that confirmation isn't required for commands
that the frontend runs behind the users back independently of this setting,
provided they are prefixed with "server". This is only for CLI commands and
does not affect frontends which use GDB/MI.
> And this solution does not help (some) frontends with
> answering 'y' to nquery()
nquery will indeed default to 'n'.
> How about:
>
> if (! caution)
> return def_value;
>
> if (server_command)
> return 1;
That might give surprising results, e.g. accidentally setting pending
breakpoints.
AFAIK this change is for _one_ frontend (Emacs) to use _one_ command (record
stop). I think too much generality detracts from this objective as, unlike
GDB/MI, the plan is not to develop annotations.
--
Nick http://www.inet.net.nz/~nickrob