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.
- From: Tom Tromey <tromey at redhat dot com>
- To: Phil Muldoon <pmuldoon at redhat dot com>
- Cc: "gdb-patches\ at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 07 May 2013 08:01:55 -0600
- Subject: Re: [patch][python] 2 of 5 - Frame filter MI code changes.
- References: <51876882 dot 3010301 at redhat dot com> <87ppx3x2k3 dot fsf at fleche dot redhat dot com> <5188BA12 dot 4050508 at redhat dot com>
>>>>> "Phil" == Phil Muldoon <pmuldoon@redhat.com> writes:
Phil> I'm not sure how I would write them just using oind. oind will be an
Phil> integer index to the last option in the argv list parsed.
Sorry about that. I didn't express myself well, maybe I was not
thinking well also.
Phil> Would fail on the first "if" condition check:
Phil> if ((argc > 3) || (argc == 2 && oind) || (argc == 1 && ! oind))
I think what I don't get is that this tests "oind" or "! oind". It
seems like it should be examining only "argc - oind". That is, it is
the relationship between oind and argc that matters (how many arguments
are left) not the value of oind (how many arguments were parsed). This
is especially true if you consider future changes that add new options.
Tom