From: Joel Brobecker <brobecker@adacore.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] new set/show multiple-choice-auto-select commands
Date: Wed, 02 Jan 2008 04:35:00 -0000 [thread overview]
Message-ID: <20080102043449.GA15903@adacore.com> (raw)
In-Reply-To: <ubq85wbec.fsf@gnu.org>
> > This has been a very practical solution when in interactive mode
> > (ie when a user is driving the session), but an annoyance when driving
> > the debugger with a tool.
>
> Please explain why, I'm not sure I understand. When driving GDB with
> a tool, the tool is responsible for doing TRT, so why is this a
> nuisance? And how does your solution alleviates that nuisance?
The "tool" in this case was a GDB script, and the customer didn't
want to see the menus in the output. And also, some of the AdaCore
engineers were tired of seeing the menu when they were always selecting
the "all" choice. So it's not a matter of the tool doing TRT.
Note that "nuisance" is stronger than what I meant: It's annoying
*sometimes* to have to deal with the menu. Each individual has its
own preferences, and this option allows you to configure GDB accordingly.
> Can you please give an example of the behavior under each one of these
> settings? I'm afraid I cannot judge the suggestion without
> understanding its effect on the users.
Sure. When the setting is "off", the behavior is unchanged, and when
the expression has multiple matches, the output will look like this:
(gdb) b normal_menu
[0] cancel
[1] all
[2] pck.normal_menu at pck.adb:6
[3] pck.normal_menu at pck.adb:11
>
At this point, if you select 0 (cancel):
> 0
cancelled
(gdb)
If you select 1 (all):
> 1
Breakpoint 1 at 0x8049517: file pck.adb, line 6.
Breakpoint 2 at 0x804951d: file pck.adb, line 11.
warning: Multiple breakpoints were set.
Use the "delete" command to delete unwanted breakpoints.
And if you select either 2 or 3 (one specific location):
> 2
Breakpoint 4 at 0x8049517: file pck.adb, line 6.
When the setting is "all", then it's the same as the user always
selecting "1" (all) everytime the menu is displayed, except that
the menu is no longer displayed and all locations are always
selected:
(gdb) set multiple-choice-auto-select all
(gdb) b normal_menu
Breakpoint 5 at 0x8049517: file pck.adb, line 6.
Breakpoint 6 at 0x804951d: file pck.adb, line 11.
warning: Multiple breakpoints were set.
Use the "delete" command to delete unwanted breakpoints.
And, if the setting is "cancel", it's the same as the user always
selecting "0" (cancel) everytime. Similarly, the menu is never
displayed, a message is printed explaining that the expression
is ambiguous and has been canceled.
(gdb) b normal_menu
canceled because the command is ambiguous and the multiple-choice menu
has been deactivated. See set/show multiple-choice-auto-select.
> > + error (_("\
> > +canceled because the command is ambiguous and the multiple-choice menu\n\
> > +has been deactivated. See set/show multiple-choice-auto-select."));
>
> Shouldn't "canceled" be capitalized?
Yes, you're right.
> The first line of the command's doc string should be a complete
> sentence, or at least a complete phrase. That's because some help
> commands only display the first line (and stop at the first comma or
> period in that line, IIRC).
We can fix that too.
--
Joel
next prev parent reply other threads:[~2008-01-02 4:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-01 14:36 Joel Brobecker
2008-01-01 20:16 ` Eli Zaretskii
2008-01-02 4:35 ` Joel Brobecker [this message]
2008-01-05 11:03 ` Eli Zaretskii
2008-01-15 9:29 ` Markus Deuling
2008-01-15 12:37 ` Joel Brobecker
2008-01-16 7:32 ` Markus Deuling
2008-01-16 10:20 ` Joel Brobecker
2008-01-16 10:40 ` Markus Deuling
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=20080102043449.GA15903@adacore.com \
--to=brobecker@adacore.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
/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