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> +  int result = PY_BT_ERROR;

The enum type.  Here and elsewhere.

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

I think it is better for this code to check oind rather than argc.
That way it will be robust if more options are added.
And, it will mean checking fewer cases.

Phil> +      frame_low = atoi (argv[0 + raw_arg]);
Phil> +      frame_high = atoi (argv[1 + raw_arg]);

oind here and anywhere else in the functions using mi_getopt.

Phil> +  int result = PY_BT_ERROR;

enum type, it appears in a few spots.

Tom


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