* [PATCH] util.c + doc [was Re: [RFC] Queries and frontends]
[not found] ` <m3r5vztcpw.fsf@fleche.redhat.com>
@ 2009-07-30 0:41 ` Nick Roberts
2009-07-30 0:42 ` Marc Khouzam
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Nick Roberts @ 2009-07-30 0:41 UTC (permalink / raw)
To: Tom Tromey; +Cc: Marc Khouzam, gdb, gdb-patches
> I tend to think that the more generic change would be safe, and cleaner.
This should do it.
--
Nick http://www.inet.net.nz/~nickrob
2009-07-30 Nick Roberts <nickrob@snap.net.nz>
* utils.c (defaulted_query): Don't ask for confirmation if server
prefix is used.
2009-07-30 Nick Roberts <nickrob@snap.net.nz>
* gdb.texinfo (Server Prefix): Explain that server prefix suppresses
confirmation request.
*** utils.c.~1.215.~ 2009-07-22 15:29:54.000000000 +1200
--- utils.c 2009-07-30 11:39:08.000000000 +1200
*************** defaulted_query (const char *ctlstr, con
*** 1436,1443 ****
}
/* Automatically answer the default value if the user did not want
! prompts. */
! if (! caution)
return def_value;
/* If input isn't coming from the user directly, just say what
--- 1436,1443 ----
}
/* Automatically answer the default value if the user did not want
! prompts or the command was issued with the server prefix. */
! if (! caution || server_command)
return def_value;
/* If input isn't coming from the user directly, just say what
*** gdb.texinfo.~1.609.~ 2009-07-29 18:47:32.000000000 +1200
--- gdb.texinfo 2009-07-30 11:49:16.000000000 +1200
*************** The server prefix does not affect the re
*** 25607,25612 ****
--- 25607,25616 ----
history; to print a value without recording it into the value history,
use the @code{output} command instead of the @code{print} command.
+ It also disables confirmation requests irrespective of the value of
+ the @code{show confirm} command (@pxref{Messages/Warnings, ,Optional
+ Warnings and Messages}).
+
@node Prompting
@section Annotation for @value{GDBN} Input
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [PATCH] util.c + doc [was Re: [RFC] Queries and frontends]
2009-07-30 0:41 ` [PATCH] util.c + doc [was Re: [RFC] Queries and frontends] Nick Roberts
@ 2009-07-30 0:42 ` Marc Khouzam
2009-07-30 7:24 ` Nick Roberts
2009-07-30 6:46 ` Eli Zaretskii
2009-08-04 16:32 ` [PATCH] util.c + doc Tom Tromey
2 siblings, 1 reply; 11+ messages in thread
From: Marc Khouzam @ 2009-07-30 0:42 UTC (permalink / raw)
To: Nick Roberts, Tom Tromey; +Cc: gdb, gdb-patches
> -----Original Message-----
> From: gdb-owner@sourceware.org
> [mailto:gdb-owner@sourceware.org] On Behalf Of Nick Roberts
> Sent: July-29-09 7:56 PM
> To: Tom Tromey
> Cc: Marc Khouzam; gdb@sourceware.org; gdb-patches@sourceware.org
> Subject: [PATCH] util.c + doc [was Re: [RFC] Queries and frontends]
>
>
> > I tend to think that the more generic change would be
> safe, and cleaner.
>
> This should do it.
> --
> Nick
> http://www.inet.net.nz/~nickrob
>
>
> 2009-07-30 Nick Roberts <nickrob@snap.net.nz>
>
> * utils.c (defaulted_query): Don't ask for confirmation
> if server
> prefix is used.
>
>
> 2009-07-30 Nick Roberts <nickrob@snap.net.nz>
>
> * gdb.texinfo (Server Prefix): Explain that server
> prefix suppresses
> confirmation request.
>
>
> *** utils.c.~1.215.~ 2009-07-22 15:29:54.000000000 +1200
> --- utils.c 2009-07-30 11:39:08.000000000 +1200
> *************** defaulted_query (const char *ctlstr, con
> *** 1436,1443 ****
> }
>
> /* Automatically answer the default value if the user did not want
> ! prompts. */
> ! if (! caution)
> return def_value;
>
> /* If input isn't coming from the user directly, just say what
> --- 1436,1443 ----
> }
>
> /* Automatically answer the default value if the user did not want
> ! prompts or the command was issued with the server prefix. */
> ! if (! caution || server_command)
> return def_value;
>
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?
And this solution does not help (some) frontends with
answering 'y' to nquery()
How about:
if (! caution)
return def_value;
if (server_command)
return 1;
> /* If input isn't coming from the user directly, just say what
>
>
>
> *** gdb.texinfo.~1.609.~ 2009-07-29 18:47:32.000000000 +1200
> --- gdb.texinfo 2009-07-30 11:49:16.000000000 +1200
> *************** The server prefix does not affect the re
> *** 25607,25612 ****
> --- 25607,25616 ----
> history; to print a value without recording it into the
> value history,
> use the @code{output} command instead of the @code{print} command.
>
> + It also disables confirmation requests irrespective of the value of
> + the @code{show confirm} command (@pxref{Messages/Warnings, ,Optional
> + Warnings and Messages}).
> +
> @node Prompting
> @section Annotation for @value{GDBN} Input
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] util.c + doc [was Re: [RFC] Queries and frontends]
2009-07-30 0:41 ` [PATCH] util.c + doc [was Re: [RFC] Queries and frontends] Nick Roberts
2009-07-30 0:42 ` Marc Khouzam
@ 2009-07-30 6:46 ` Eli Zaretskii
2009-08-04 10:12 ` Nick Roberts
2009-08-04 16:32 ` [PATCH] util.c + doc Tom Tromey
2 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2009-07-30 6:46 UTC (permalink / raw)
To: Nick Roberts; +Cc: tromey, marc.khouzam, gdb, gdb-patches
> Date: Thu, 30 Jul 2009 11:55:49 +1200
> Cc: "Marc Khouzam" <marc.khouzam@ericsson.com>, <gdb@sourceware.org>, gdb-patches@sourceware.org
> From: nickrob@snap.net.nz (Nick Roberts)
>
> + It also disables confirmation requests irrespective of the value of
> + the @code{show confirm} command (@pxref{Messages/Warnings, ,Optional
> + Warnings and Messages}).
"value of `show confirm' command" sounds awkward (a command cannot
have a value). Can you suggest a better wording?
Thanks.
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [PATCH] util.c + doc [was Re: [RFC] Queries and frontends]
2009-07-30 0:42 ` Marc Khouzam
@ 2009-07-30 7:24 ` Nick Roberts
2009-07-30 16:02 ` Marc Khouzam
0 siblings, 1 reply; 11+ messages in thread
From: Nick Roberts @ 2009-07-30 7:24 UTC (permalink / raw)
To: Marc Khouzam; +Cc: Tom Tromey, gdb-patches
> 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
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [PATCH] util.c + doc [was Re: [RFC] Queries and frontends]
2009-07-30 7:24 ` Nick Roberts
@ 2009-07-30 16:02 ` Marc Khouzam
0 siblings, 0 replies; 11+ messages in thread
From: Marc Khouzam @ 2009-07-30 16:02 UTC (permalink / raw)
To: Nick Roberts; +Cc: Tom Tromey, gdb-patches
> -----Original Message-----
> From: Nick Roberts [mailto:nickrob@snap.net.nz]
> Sent: Thursday, July 30, 2009 12:40 AM
> To: Marc Khouzam
> Cc: Tom Tromey; gdb-patches@sourceware.org
> Subject: RE: [PATCH] util.c + doc [was Re: [RFC] Queries and
> frontends]
>
>
> > 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.
You are right, that won't help me.
Sorry about the confusion.
>
> > 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
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] util.c + doc [was Re: [RFC] Queries and frontends]
2009-07-30 6:46 ` Eli Zaretskii
@ 2009-08-04 10:12 ` Nick Roberts
2009-08-04 17:51 ` Eli Zaretskii
0 siblings, 1 reply; 11+ messages in thread
From: Nick Roberts @ 2009-08-04 10:12 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: tromey, marc.khouzam, gdb-patches
> "value of `show confirm' command" sounds awkward (a command cannot
> have a value). Can you suggest a better wording?
Perhaps it's enough to say that they are disabled and point to the existing
description.
--
Nick http://www.inet.net.nz/~nickrob
Index: gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.613
diff -c -p -r1.613 gdb.texinfo
*** gdb.texinfo 3 Aug 2009 12:39:00 -0000 1.613
--- gdb.texinfo 4 Aug 2009 10:08:55 -0000
*************** Displays how many symbol complaints @val
*** 17972,17977 ****
--- 17972,17978 ----
@end table
+ @anchor{confirmation requests}
By default, @value{GDBN} is cautious, and asks what sometimes seems to be a
lot of stupid questions to confirm certain commands. For example, if
you try to run a program which is already running:
*************** The server prefix does not affect the re
*** 25664,25669 ****
--- 25665,25672 ----
history; to print a value without recording it into the value history,
use the @code{output} command instead of the @code{print} command.
+ It also disables confirmation requests (@pxref{confirmation requests}).
+
@node Prompting
@section Annotation for @value{GDBN} Input
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] util.c + doc
2009-07-30 0:41 ` [PATCH] util.c + doc [was Re: [RFC] Queries and frontends] Nick Roberts
2009-07-30 0:42 ` Marc Khouzam
2009-07-30 6:46 ` Eli Zaretskii
@ 2009-08-04 16:32 ` Tom Tromey
2 siblings, 0 replies; 11+ messages in thread
From: Tom Tromey @ 2009-08-04 16:32 UTC (permalink / raw)
To: Nick Roberts; +Cc: Marc Khouzam, gdb, gdb-patches
>>>>> "Nick" == Nick Roberts <nickrob@snap.net.nz> writes:
Nick> This should do it.
Nick> 2009-07-30 Nick Roberts <nickrob@snap.net.nz>
Nick> * utils.c (defaulted_query): Don't ask for confirmation if server
Nick> prefix is used.
This part is ok.
Thanks.
Tom
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] util.c + doc [was Re: [RFC] Queries and frontends]
2009-08-04 10:12 ` Nick Roberts
@ 2009-08-04 17:51 ` Eli Zaretskii
2009-08-06 5:21 ` Nick Roberts
0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2009-08-04 17:51 UTC (permalink / raw)
To: Nick Roberts; +Cc: tromey, marc.khouzam, gdb-patches
> Date: Tue, 4 Aug 2009 22:11:54 +1200
> Cc: tromey@redhat.com, marc.khouzam@ericsson.com, gdb-patches@sourceware.org
> From: nickrob@snap.net.nz (Nick Roberts)
>
> > "value of `show confirm' command" sounds awkward (a command cannot
> > have a value). Can you suggest a better wording?
>
> Perhaps it's enough to say that they are disabled and point to the existing
> description.
> [...]
> + It also disables confirmation requests (@pxref{confirmation requests}).
Yes, that's good, but the sentence is too far from the first paragraph
of this section to make "It" self-explanatory. How about the variant
below?
The @code{server } prefix also disables confirmation requests
(@pxref{confirmation requests}).
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] util.c + doc [was Re: [RFC] Queries and frontends]
2009-08-04 17:51 ` Eli Zaretskii
@ 2009-08-06 5:21 ` Nick Roberts
2009-08-06 8:24 ` Andreas Schwab
2009-08-06 18:11 ` Eli Zaretskii
0 siblings, 2 replies; 11+ messages in thread
From: Nick Roberts @ 2009-08-06 5:21 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: tromey, marc.khouzam, gdb-patches
> Yes, that's good, but the sentence is too far from the first paragraph
> of this section to make "It" self-explanatory. How about the variant
> below?
>
> The @code{server } prefix also disables confirmation requests
> (@pxref{confirmation requests}).
The phrase "The server prefix" is already used three lines earlier
(without @code). How about:
*** gdb.texinfo 06 Aug 2009 15:42:03 +1200 1.614
--- gdb.texinfo 06 Aug 2009 17:07:08 +1200
*************** Displays how many symbol complaints @val
*** 18009,18014 ****
--- 18009,18015 ----
@end table
+ @anchor{confirmation requests}
By default, @value{GDBN} is cautious, and asks what sometimes seems to be a
lot of stupid questions to confirm certain commands. For example, if
you try to run a program which is already running:
*************** command to repeat if @key{RET} is presse
*** 25697,25705 ****
means that commands can be run behind a user's back by a front-end in
a transparent manner.
! The server prefix does not affect the recording of values into the value
! history; to print a value without recording it into the value history,
! use the @code{output} command instead of the @code{print} command.
@node Prompting
@section Annotation for @value{GDBN} Input
--- 25698,25710 ----
means that commands can be run behind a user's back by a front-end in
a transparent manner.
! The @code{server } prefix does not affect the recording of values into
! the value history; to print a value without recording it into the
! value history, use the @code{output} command instead of the
! @code{print} command.
!
! Using this prefix also disables confirmation requests
! (@pxref{confirmation requests}).
@node Prompting
@section Annotation for @value{GDBN} Input
--
Nick http://www.inet.net.nz/~nickrob
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] util.c + doc [was Re: [RFC] Queries and frontends]
2009-08-06 5:21 ` Nick Roberts
@ 2009-08-06 8:24 ` Andreas Schwab
2009-08-06 18:11 ` Eli Zaretskii
1 sibling, 0 replies; 11+ messages in thread
From: Andreas Schwab @ 2009-08-06 8:24 UTC (permalink / raw)
To: Nick Roberts; +Cc: Eli Zaretskii, tromey, marc.khouzam, gdb-patches
nickrob@snap.net.nz (Nick Roberts) writes:
> ! The @code{server } prefix does not affect the recording of values into
Other occurrences are using the @samp markup.
Andreas.
--
Andreas Schwab, schwab@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E
"And now for something completely different."
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] util.c + doc [was Re: [RFC] Queries and frontends]
2009-08-06 5:21 ` Nick Roberts
2009-08-06 8:24 ` Andreas Schwab
@ 2009-08-06 18:11 ` Eli Zaretskii
1 sibling, 0 replies; 11+ messages in thread
From: Eli Zaretskii @ 2009-08-06 18:11 UTC (permalink / raw)
To: Nick Roberts; +Cc: tromey, marc.khouzam, gdb-patches
> Date: Thu, 6 Aug 2009 17:21:29 +1200
> Cc: tromey@redhat.com, marc.khouzam@ericsson.com, gdb-patches@sourceware.org
> From: nickrob@snap.net.nz (Nick Roberts)
>
> ! The @code{server } prefix does not affect the recording of values into
> ! the value history; to print a value without recording it into the
> ! value history, use the @code{output} command instead of the
> ! @code{print} command.
> !
> ! Using this prefix also disables confirmation requests
> ! (@pxref{confirmation requests}).
This is good, thanks.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2009-08-06 17:58 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <6D19CA8D71C89C43A057926FE0D4ADAA07C00023@ecamlmw720.eamcs.ericsson.se>
[not found] ` <19045.23703.743876.775308@totara.tehura.co.nz>
[not found] ` <m37hxwm3wr.fsf@fleche.redhat.com>
[not found] ` <19053.2107.342469.683795@totara.tehura.co.nz>
[not found] ` <m3iqheje2p.fsf@fleche.redhat.com>
[not found] ` <19054.23189.193878.534661@totara.tehura.co.nz>
[not found] ` <m3r5vztcpw.fsf@fleche.redhat.com>
2009-07-30 0:41 ` [PATCH] util.c + doc [was Re: [RFC] Queries and frontends] Nick Roberts
2009-07-30 0:42 ` Marc Khouzam
2009-07-30 7:24 ` Nick Roberts
2009-07-30 16:02 ` Marc Khouzam
2009-07-30 6:46 ` Eli Zaretskii
2009-08-04 10:12 ` Nick Roberts
2009-08-04 17:51 ` Eli Zaretskii
2009-08-06 5:21 ` Nick Roberts
2009-08-06 8:24 ` Andreas Schwab
2009-08-06 18:11 ` Eli Zaretskii
2009-08-04 16:32 ` [PATCH] util.c + doc Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox