Re: [RFA] new set/show multiple-choice-auto-select commands

Joel Brobecker
2008-01-16T10:20:07Z

> >The principle is indeed the same. The semantics of your command
> >are a little unclear to me, as you didn't say what should happen
> >if symbol-user-choice is off and you have more than one symbol matching.
> >Do you cancel the lookup, choose all symbols, and pick one at random?
>
> no, if it is set to off the default behaviour of GDB takes place. GDB
> executes the "normal" symbol lookup routines as-is now.

Actually, I was asking you to confirm what the current "normal" symbol
lookup does. AFAIK, it picks one symbol at random, which is a bug.
So my question still stands :), but the answer is not critical for
my part of the patch - we can talk about that later when you make
your own adjustments inside linespec.

> Hm, I guess it should be ok to have "on" as default. I could change
> the patch a bit so the the user menu only gets invoked if > 1 symbol
> is found and the normal lookup routines if <= 1 symbol is found.
> Then there would only be a choice if there are multiple symbols.

Absolutely. There is no point in printing a menu if there is only
one match :). You will notice that I am thinking purely in terms
of user interface at this point, I'm leaving the implementation
aspect out as an implementation detail.

> Sure, if you put your command in linespec.c and set default to "on"
> I'll rework the patch to make use of the command and invoke the user
> menu if there are > 1 symbols found.

Deal. A new patch should be sent soon.

--
Joel