Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Marc Khouzam" <marc.khouzam@ericsson.com>
To: "Nick Roberts" <nickrob@snap.net.nz>
Cc: <gdb@sourceware.org>
Subject: RE: [RFC] Queries and frontends
Date: Tue, 21 Jul 2009 18:37:00 -0000	[thread overview]
Message-ID: <6D19CA8D71C89C43A057926FE0D4ADAA07C00569@ecamlmw720.eamcs.ericsson.se> (raw)
In-Reply-To: <19045.23703.743876.775308@totara.tehura.co.nz>

> -----Original Message-----
> From: Nick Roberts [mailto:nickrob@snap.net.nz] 
> Sent: July-21-09 2:14 AM
> To: Marc Khouzam
> Cc: gdb@sourceware.org
> Subject: Re: [RFC] Queries and frontends
> 
> 
>  > First, let's mention the "set confirm off" command.  The 
> documentation
>  > at section 20.7 reads:
>  > "If you are willing to unflinchingly face the consequences 
> of your own 
>  > commands, you can disable this "feature":"
>  > 
>  > So, from the doc and from what seems (to me :-)) like the proper 
>  > behavior, when we "set confirm off", all commands that use a query 
>  > 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 
> 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.
> 
> 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 
> answer of 'n'.
>  > What that means (unless I'm wrong) is that with "set confirm off",
>  > pending breakpoints will NOT be set.
>  > 
>  > The patch below changes defaulted_query() to always answer "yes" if
>  > 'confirm' is off.
> 
> I would find this behaviour confusing.  In any case, the "set 
> confirm off"
> command is for interactive use, not front ends.
> 
> Here's a revised patch for my original request.  It doesn't 
> help with issues
> relating to GDB/MI but just uses the "server prefix" instead 
> of a special
> option.  I have used this trick previously (2007-07-10) to 
> avoid setting the
> convenience variable $_ with breakpoints.  This seems 
> appropriate as I think
> the "server" command was created many years ago by Tom Lord 
> or Jim Kingdon for
> use with annotations.  I could add a suitable note to the 
> documentation.
> 
> -- 
> Nick                                           
> http://www.inet.net.nz/~nickrob
> 
> 
> 2009-07-21  Nick Roberts  <nickrob@snap.net.nz>
> 
> 	* record.c (cmd_record_stop): Don't ask for confirmation if
> 	server prefix is used.
> 
> 
> *** 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"
>   
>   #include <signal.h>
>   
> *************** cmd_record_stop (char *args, int from_tt
> *** 1157,1164 ****
>   {
>     if (current_target.to_stratum == record_stratum)
>       {
> !       if (!record_list || !from_tty || query (_("Delete 
> recorded log and "
> ! 	                                        "stop recording?")))
>   	unpush_target (&record_ops);
>       }
>     else
> --- 1158,1165 ----
>   {
>     if (current_target.to_stratum == record_stratum)
>       {
> !       if (!record_list || !from_tty || server_command 
> ! 	  || query (_("Delete recorded log and stop recording?")))
>   	unpush_target (&record_ops);
>       }
>     else
> 


  parent reply	other threads:[~2009-07-21 18:37 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-21  3:18 Marc Khouzam
2009-07-21  6:13 ` Nick Roberts
2009-07-21  8:26   ` Hui Zhu
2009-07-21  8:29     ` Hui Zhu
2009-07-21 11:51       ` Nick Roberts
2009-07-22  6:11         ` Hui Zhu
2009-07-21 17:57   ` Michael Snyder
2009-07-21 18:37   ` Marc Khouzam [this message]
2009-07-21 18:55     ` Daniel Jacobowitz
2009-07-21 23:29       ` Nick Roberts
2009-07-22 13:38       ` Marc Khouzam
2009-07-26  5:04   ` Tom Tromey
2009-07-27  1:52     ` Nick Roberts
2009-07-27 16:17       ` Tom Tromey
2009-07-28  1:55         ` Nick Roberts
2009-07-29 21:13           ` Tom Tromey
2009-07-29 23:56             ` [PATCH] util.c + doc [was Re: [RFC] Queries and frontends] Nick Roberts
2009-07-30  0:28               ` Marc Khouzam
2009-07-30  3:13               ` Eli Zaretskii
2009-08-04 16:32               ` [PATCH] util.c + doc Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6D19CA8D71C89C43A057926FE0D4ADAA07C00569@ecamlmw720.eamcs.ericsson.se \
    --to=marc.khouzam@ericsson.com \
    --cc=gdb@sourceware.org \
    --cc=nickrob@snap.net.nz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox