Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Markus Deuling <deuling@de.ibm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] new set/show multiple-choice-auto-select commands (take 2)
Date: Thu, 17 Jan 2008 10:27:00 -0000	[thread overview]
Message-ID: <20080117102621.GB28020@adacore.com> (raw)
In-Reply-To: <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


  reply	other threads:[~2008-01-17 10:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-16 13:56 Joel Brobecker
2008-01-17  6:37 ` Markus Deuling
2008-01-17 10:27   ` Joel Brobecker [this message]
2008-01-17 11:41     ` Markus Deuling
2008-01-17 12:31       ` Joel Brobecker
2008-01-17 14:26       ` Daniel Jacobowitz
2008-01-17 14:51         ` Joel Brobecker
2008-01-17 15:07           ` Daniel Jacobowitz
2008-01-23 15:33             ` Joel Brobecker

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=20080117102621.GB28020@adacore.com \
    --to=brobecker@adacore.com \
    --cc=deuling@de.ibm.com \
    --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