From: Hui Zhu <teawater@gmail.com>
To: Nick Roberts <nickrob@snap.net.nz>
Cc: Marc Khouzam <marc.khouzam@ericsson.com>, gdb@sourceware.org
Subject: Re: [RFC] Queries and frontends
Date: Tue, 21 Jul 2009 08:29:00 -0000 [thread overview]
Message-ID: <daef60380907210128j40c6116dr42ee6af5d609057c@mail.gmail.com> (raw)
In-Reply-To: <daef60380907210126l54cfd805j9d467c45a9bb8075@mail.gmail.com>
On Tue, Jul 21, 2009 at 16:26, Hui Zhu<teawater@gmail.com> wrote:
> On Tue, Jul 21, 2009 at 14:13, Nick Roberts<nickrob@snap.net.nz> wrote:
>> > 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.
>>
>> > 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
>>
>
> About this patch. I had said that I think add a special command for
> it is better.
>
BTW, what about this?
maintenance print target-stack
The current target stack is:
- record (Process record and replay target)
- child (Unix child process)
- exec (Local exec file)
- None (None)
Thanks,
Hui
next prev parent reply other threads:[~2009-07-21 8:29 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 [this message]
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
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=daef60380907210128j40c6116dr42ee6af5d609057c@mail.gmail.com \
--to=teawater@gmail.com \
--cc=gdb@sourceware.org \
--cc=marc.khouzam@ericsson.com \
--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