This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] new set/show multiple-choice-auto-select commands (take 2)
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Markus Deuling <deuling at de dot ibm dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 17 Jan 2008 02:26:21 -0800
- Subject: Re: [RFA] new set/show multiple-choice-auto-select commands (take 2)
- References: <20080116135551.GE20837@adacore.com> <478EF71D.4060007@de.ibm.com>
Hi Markus,
> (gdb) br foo2
> Breakpoint 2 at 0xf86444: file
> /home/deuling/gdb/dev/gdb/testsuite/gdb.base/solib-symbol-lib.c, line 29.
> (gdb) set multiple-choice-auto-select all
> (gdb) br foo2
> [0] cancel
> [1] all
> [2] foo2 at
> /home/deuling/gdb/dev/gdb/testsuite/gdb.base/solib-symbol-main.c:39
> [3] foo2 at
> /home/deuling/gdb/dev/gdb/testsuite/gdb.base/solib-symbol-lib.c:29
> >2 3
> Breakpoint 3 at 0x8048523: file
> /home/deuling/gdb/dev/gdb/testsuite/gdb.base/solib-symbol-main.c, line 39.
> Note: breakpoint 2 also set at pc 0xf86444.
> Breakpoint 4 at 0xf86444: file
> /home/deuling/gdb/dev/gdb/testsuite/gdb.base/solib-symbol-lib.c, line 29.
> warning: Multiple breakpoints were set.
> Use the "delete" command to delete unwanted breakpoints.
> (gdb)
It looks to me that you may be confused as to the semantics of
the new setting that I introduced. I want to say purely at the user
level for now, and worry about the implementation later.
Let me clarify the current semantics of multiple-choice-auto-select.
The idea is that, if multiple-choice-auto-select is turned on, then
some "auto-select" will happen. Otherwise, no auto-select, and thus
a menu needs to be displayed in order for the expression to be
disambiguated. Now, in terms of the command itself:
1. set multiple-choice-auto-select off (default):
Auto-select is turned off, so the multiple-choice menu is
displayed, and the user must chose the ones he wants.
2. set multiple-choice-auto-select all:
In that case, the auto-select will automatically choose the "all"
choice. If the "all" option is not available because you are expected
to choose 1 and only 1 choice, then an error is triggered.
3. set multiple-choice-auto-select cancel:
In that case, the auto-select will automatically choose the "cancel"
option of the multiple-choice menu.
Following this logic:
In your example above, after having set "multiple-choice-auto-select"
to all, your "break" command should not result in a menu being
displayed - instead, it should automatically break at both locations.
However, in the first case, when multiple-choice-auto-select was still
off, the menu should have been displayed, so that the user can choose
which one he wants.
Back to your particular case: The semantics that you are looking for
are:
1. Multiple-choice menu activated: Let the user choose.
2. Multiple-choice menu deactivated: Choose the symbol in the "current"
shared library first.
I spent some time familiarizing myself with -Bsymbolic and the way
you introduced handling of these duplicated symbol names. Although
you and Daniel thought that it would be a good idea to treat these
types of symbols differently from other ambiguous expressions,
I don't quite understand why. But regardless of that fact, it seems
that the semantics of what you'd like to do is different from what
I am introducing, and that you should therefore have your own option.
What do you think?
--
Joel