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: Thu, 25 Apr 2013 13:35:48 -0600
- Subject: Re: [patch][python] 2 of 5 - Frame filter MI code changes.
- References: <51753BAE dot 7000406 at redhat dot com>
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