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> @@ -52,14 +78,43 @@ mi_cmd_stack_list_frames (char *command, char **argv, int argc)

Phil> +  if ((argc > 3) || (argc == 2 && oind) || (argc == 1 && ! oind))
Phil> +    error (_("-stack-list-frames: Usage: [--no-frame-filters] [FRAME_LOW FRAME_HIGH]"));
 
Phil> -  if (argc == 2)
Phil> +  if (argc == 3 || argc == 2)

It seems to me that these checks should use oind rather than argc.
Then they would be simpler.

As it is I think they are wrong for the weird but accepted input:

-stack-list-frames --no-frame-filters --no-frame-filters 0 15

Tom


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