This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch][python] 2 of 5 - Frame filter MI code changes.
On 13/03/13 20:27, Tom Tromey wrote:
>>>>>> "Phil" == Phil Muldoon <pmuldoon@redhat.com> writes:
>
> Phil> I do apologies, I forgot to add the mi-getopt.c patch in with the
> Phil> patch-set. Here it is.
>
> No problem.
>
> It seems to me that just adding a "-" to the option string in the
> callers is simpler, and probably better -- this patch makes "-" and "--"
> options synonymous in all cases, but I'm not sure we want that.
Currently (before my patch) the commands self parse their own --
values. One of the things from the last review was you wanted where
possible to use mi-getopt to parse options.
It would seem weird to me to mix - and -- in these commands.
You would have:
-no-frame-filters --all-values
Where -no-frame-filters is parsed by mi_getopt with the single "-" and
"--all-values" is parsed by the command. So I patched mi_getopt to
parse "--" values for consistency. (Remember we can't use mi_getopt to
parse --all-values, et al as they can be replaced with integer
equivalents, ie 0, 1, 3 depending on whether it is --no-values,
--all-values or --simple-values). Normally I would change this to be
saner, but then we might break MI clients that reply on this integer
substitution.
Cheers
Phil