From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28033 invoked by alias); 21 Jul 2009 18:37:44 -0000 Received: (qmail 28022 invoked by uid 22791); 21 Jul 2009 18:37:43 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from imr1.ericy.com (HELO imr1.ericy.com) (198.24.6.9) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 21 Jul 2009 18:37:36 +0000 Received: from eusrcmw750.eamcs.ericsson.se (eusrcmw750.exu.ericsson.se [138.85.77.50]) by imr1.ericy.com (8.13.1/8.13.1) with ESMTP id n6LIbLOl009034; Tue, 21 Jul 2009 13:37:24 -0500 Received: from ecamlmw720.eamcs.ericsson.se ([142.133.1.72]) by eusrcmw750.eamcs.ericsson.se with Microsoft SMTPSVC(6.0.3790.3959); Tue, 21 Jul 2009 13:36:38 -0500 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Subject: RE: [RFC] Queries and frontends Date: Tue, 21 Jul 2009 18:37:00 -0000 Message-ID: <6D19CA8D71C89C43A057926FE0D4ADAA07C00569@ecamlmw720.eamcs.ericsson.se> In-Reply-To: <19045.23703.743876.775308@totara.tehura.co.nz> References: <6D19CA8D71C89C43A057926FE0D4ADAA07C00023@ecamlmw720.eamcs.ericsson.se> <19045.23703.743876.775308@totara.tehura.co.nz> From: "Marc Khouzam" To: "Nick Roberts" Cc: X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-07/txt/msg00170.txt.bz2 > -----Original Message----- > From: Nick Roberts [mailto:nickrob@snap.net.nz]=20 > Sent: July-21-09 2:14 AM > To: Marc Khouzam > Cc: gdb@sourceware.org > Subject: Re: [RFC] Queries and frontends >=20 >=20 > > First, let's mention the "set confirm off" command. The=20 > documentation > > at section 20.7 reads: > > "If you are willing to unflinchingly face the consequences=20 > of your own=20 > > commands, you can disable this "feature":" > >=20 > > So, from the doc and from what seems (to me :-)) like the proper=20 > > behavior, when we "set confirm off", all commands that use a query=20 > > should simply be performed without asking the user. > > > > The current implementation of queries does not do that. Instead, > > it will follow the default answer of a query. Such a=20 > default answer > > makes sense when trying to guide the user in a choice, but when > > "set confirm off" we should really let the command execute. >=20 > The behaviour is as I would expect from the documentation. I guess it's just me then. But with "set confirm off", which one may choose to use, how would you set pending breakpoints, currently? You just won't be able to, right? Isn't that a problem? In fact, any code using nquery() will not be able to be used by anyone using "set confirm off". Which is the problem with PRecord for me. I'm thinking this is a more general problem than just fixing PRecord. > > As an example, setting pending breakpoints has a default=20 > answer of 'n'. > > What that means (unless I'm wrong) is that with "set confirm off", > > pending breakpoints will NOT be set. > >=20 > > The patch below changes defaulted_query() to always answer "yes" if > > 'confirm' is off. >=20 > I would find this behaviour confusing. In any case, the "set=20 > confirm off" > command is for interactive use, not front ends. >=20 > Here's a revised patch for my original request. It doesn't=20 > help with issues > relating to GDB/MI but just uses the "server prefix" instead=20 > of a special > option. I have used this trick previously (2007-07-10) to=20 > avoid setting the > convenience variable $_ with breakpoints. This seems=20 > appropriate as I think > the "server" command was created many years ago by Tom Lord=20 > or Jim Kingdon for > use with annotations. I could add a suitable note to the=20 > documentation. >=20 > --=20 > Nick=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 > http://www.inet.net.nz/~nickrob >=20 >=20 > 2009-07-21 Nick Roberts >=20 > * record.c (cmd_record_stop): Don't ask for confirmation if > server prefix is used. >=20 >=20 > *** record.c.~1.8.~ 2009-07-21 17:58:01.000000000 +1200 > --- record.c 2009-07-21 18:02:30.000000000 +1200 > *************** > *** 24,29 **** > --- 24,30 ---- > #include "event-top.h" > #include "exceptions.h" > #include "record.h" > + #include "top.h" >=20=20=20 > #include >=20=20=20 > *************** cmd_record_stop (char *args, int from_tt > *** 1157,1164 **** > { > if (current_target.to_stratum =3D=3D record_stratum) > { > ! if (!record_list || !from_tty || query (_("Delete=20 > recorded log and " > ! "stop recording?"))) > unpush_target (&record_ops); > } > else > --- 1158,1165 ---- > { > if (current_target.to_stratum =3D=3D record_stratum) > { > ! if (!record_list || !from_tty || server_command=20 > ! || query (_("Delete recorded log and stop recording?"))) > unpush_target (&record_ops); > } > else >=20