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:56, Tom Tromey wrote:
>>>>>> "Phil" == Phil Muldoon <pmuldoon@redhat.com> writes:
>
> Phil> Currently (before my patch) the commands self parse their own --
> Phil> values. One of the things from the last review was you wanted where
> Phil> possible to use mi-getopt to parse options.
>
> Phil> It would seem weird to me to mix - and -- in these commands.
>
> I mean if you change the string in the mi_opt table from
> "no-frame-filters" to "-no-frame-filters", then this should cause
> mi_getopt to accept the "--" form without affecting other callers.
>
> Tom
>
Originally I did do that, but the error message if you mistype an
option generated by mi_getopt is wrong:
-stack-list-frames --no-frame-falters
^error,msg="-stack-list-frames: Unknown option ``-no-frame-falters''"
(gdb)
The error messages always assumes a "-". And if I was going to end up
patching mi_getopt then I might as well go ahead and handle "--"
options properly.
I am not sure what you mean other callers, though. Other callers are
not affected. "-" options work fine still, as do "--". Anyway, I have
no strong feelings on this. If the error message above is fine with
you we can do that, or keep the existing patch.
What do you prefer?
Cheers,
Phil