* [Bug gdb/15800] IWBN to override what defaulted_query will do when input is not from terminal
2013-07-29 19:30 [Bug gdb/15800] New: IWBN to override what defaulted_query will do when input is not from terminal dje at google dot com
@ 2013-07-29 19:38 ` palves at redhat dot com
2013-07-29 20:27 ` dje at google dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: palves at redhat dot com @ 2013-07-29 19:38 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=15800
Pedro Alves <palves at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |palves at redhat dot com
--- Comment #1 from Pedro Alves <palves at redhat dot com> ---
That's possibly to be a too-big-a-hammer.
We tend to be careful with choosing the default action (negative vs positive
wording, query/nquery/yquery). I can imagine all sorts of wrong answers if we
just switched the default of "query". IMO, it's better to handle this
query-by-query.
That is, add a "set skip pending on/off/auto/whatnot" for this case, mirroring
"set breakpoint pending".
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug gdb/15800] IWBN to override what defaulted_query will do when input is not from terminal
2013-07-29 19:30 [Bug gdb/15800] New: IWBN to override what defaulted_query will do when input is not from terminal dje at google dot com
2013-07-29 19:38 ` [Bug gdb/15800] " palves at redhat dot com
@ 2013-07-29 20:27 ` dje at google dot com
2013-07-30 13:46 ` palves at redhat dot com
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: dje at google dot com @ 2013-07-29 20:27 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=15800
--- Comment #2 from dje at google dot com ---
Depending on how it is implemented, yes, it could be a bit of a big hammer.
I was expecting to use it like:
(with-query-default "y" "skip file foo.c")
or some such.
[No apologies for having fun with Scheme. :-)]
I used "skip" as an example of a potentially general problem.
For "skip" itself, set "skip pending on/off/auto" or some such
is another way to go (as previously mentioned on IRC).
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug gdb/15800] IWBN to override what defaulted_query will do when input is not from terminal
2013-07-29 19:30 [Bug gdb/15800] New: IWBN to override what defaulted_query will do when input is not from terminal dje at google dot com
2013-07-29 19:38 ` [Bug gdb/15800] " palves at redhat dot com
2013-07-29 20:27 ` dje at google dot com
@ 2013-07-30 13:46 ` palves at redhat dot com
2013-08-02 14:02 ` tromey at redhat dot com
2013-08-02 17:43 ` dje at google dot com
4 siblings, 0 replies; 6+ messages in thread
From: palves at redhat dot com @ 2013-07-30 13:46 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=15800
--- Comment #3 from Pedro Alves <palves at redhat dot com> ---
(sorry, I was not on IRC then, and well, that doesn't get archived)
> (with-query-default "y" "skip file foo.c")
I still think it's a too big a hammer. You don't really know which query GDB
will throw at the user. Sure, usually it'll be the one you want, but sometimes
it won't. And it's those other times that'll make such generic hammer
annoying.
We could still use a generic wrapping function like:
(wrap-option "skip pending" "on" "skip file foo.c")
With wrap-option working with any GDB option. It just needs to store the
current value, set it to the second argument, run the command, and then restore
the initial value. Should be doable in Python already today.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug gdb/15800] IWBN to override what defaulted_query will do when input is not from terminal
2013-07-29 19:30 [Bug gdb/15800] New: IWBN to override what defaulted_query will do when input is not from terminal dje at google dot com
` (2 preceding siblings ...)
2013-07-30 13:46 ` palves at redhat dot com
@ 2013-08-02 14:02 ` tromey at redhat dot com
2013-08-02 17:43 ` dje at google dot com
4 siblings, 0 replies; 6+ messages in thread
From: tromey at redhat dot com @ 2013-08-02 14:02 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=15800
Tom Tromey <tromey at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at redhat dot com
--- Comment #4 from Tom Tromey <tromey at redhat dot com> ---
There were threads in the past about this problem, from the MI
perspective. One further issue is that the queries change over time.
You can nearly do the "with" thing in Python. However, bug#12188 can
get in the way, depending on the parameter you choose.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug gdb/15800] IWBN to override what defaulted_query will do when input is not from terminal
2013-07-29 19:30 [Bug gdb/15800] New: IWBN to override what defaulted_query will do when input is not from terminal dje at google dot com
` (3 preceding siblings ...)
2013-08-02 14:02 ` tromey at redhat dot com
@ 2013-08-02 17:43 ` dje at google dot com
4 siblings, 0 replies; 6+ messages in thread
From: dje at google dot com @ 2013-08-02 17:43 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=15800
--- Comment #5 from dje at google dot com ---
Yeah, defaulted_query is flawed from a scripting point of view.
Consider this bug a discussion for how to fix it.
It's easy enough to add defaulted_query calls to code without remembering that
every one screws the user wanting to script that command unless extra steps are
taken, but do we want (effectively) a user-settable option for every
defaulted_query?
E.g.
if (pending_break_support == AUTO_BOOLEAN_AUTO
&& !nquery (_("Make %s pending on future shared library load? "),
bptype_string (type_wanted)))
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread