This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch][python] 2 of 5 - Frame filter MI code changes.


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]