2011-12-16 Andrey Smirnov <andrew.smirnov@gmail.com>
+ * mi/mi-main.c (mi_cmd_list_thread_groups): Rename `optind' and
+ `optarg' to `oind' and `oarg', respectively(-Wshadow).
+ (mi_cmd_data_read_memory): Ditto.
+ (mi_cmd_data_read_memory_bytes): Ditto.
+ (mi_cmd_data_write_memory): Ditto.
+
+2011-12-16 Andrey Smirnov <andrew.smirnov@gmail.com>
+
* mi/mi-getopt.c (mi_getopt): Rename `optind' and `optarg' to
`oind' and `oarg', respectively(-Wshadow).
(mi_valid_noargs): Ditto.
{ 0, 0, 0 }
};
- int optind = 0;
- char *optarg;
+ int oind = 0;
+ char *oarg;
while (1)
{
int opt = mi_getopt ("-list-thread-groups", argc, argv, opts,
- &optind, &optarg);
+ &oind, &oarg);
if (opt < 0)
break;
available = 1;
break;
case RECURSE_OPT:
- if (strcmp (optarg, "0") == 0)
+ if (strcmp (oarg, "0") == 0)
;
- else if (strcmp (optarg, "1") == 0)
+ else if (strcmp (oarg, "1") == 0)
recurse = 1;
else
error (_("only '0' and '1' are valid values "
}
}
- for (; optind < argc; ++optind)
+ for (; oind < argc; ++oind)
{
char *end;
int inf;
- if (*(argv[optind]) != 'i')
- error (_("invalid syntax of group id '%s'"), argv[optind]);
+ if (*(argv[oind]) != 'i')
+ error (_("invalid syntax of group id '%s'"), argv[oind]);
- inf = strtoul (argv[optind] + 1, &end, 0);
+ inf = strtoul (argv[oind] + 1, &end, 0);
if (*end != '\0')
- error (_("invalid syntax of group id '%s'"), argv[optind]);
+ error (_("invalid syntax of group id '%s'"), argv[oind]);
VEC_safe_push (int, ids, inf);
}
if (VEC_length (int, ids) > 1)
gdb_byte *mbuf;
int nr_bytes;
long offset = 0;
- int optind = 0;
- char *optarg;
+ int oind = 0;
+ char *oarg;
enum opt
{
OFFSET_OPT
while (1)
{
int opt = mi_getopt ("-data-read-memory", argc, argv, opts,
- &optind, &optarg);
+ &oind, &oarg);
if (opt < 0)
break;
switch ((enum opt) opt)
{
case OFFSET_OPT:
- offset = atol (optarg);
+ offset = atol (oarg);
break;
}
}
- argv += optind;
- argc -= optind;
+ argv += oind;
+ argc -= oind;
if (argc < 5 || argc > 6)
error (_("-data-read-memory: Usage: "
int ix;
VEC(memory_read_result_s) *result;
long offset = 0;
- int optind = 0;
- char *optarg;
+ int oind = 0;
+ char *oarg;
enum opt
{
OFFSET_OPT
while (1)
{
int opt = mi_getopt ("-data-read-memory-bytes", argc, argv, opts,
- &optind, &optarg);
+ &oind, &oarg);
if (opt < 0)
break;
switch ((enum opt) opt)
{
case OFFSET_OPT:
- offset = atol (optarg);
+ offset = atol (oarg);
break;
}
}
- argv += optind;
- argc -= optind;
+ argv += oind;
+ argc -= oind;
if (argc != 2)
error (_("Usage: [ -o OFFSET ] ADDR LENGTH."));
void *buffer;
struct cleanup *old_chain;
long offset = 0;
- int optind = 0;
- char *optarg;
+ int oind = 0;
+ char *oarg;
enum opt
{
OFFSET_OPT
while (1)
{
int opt = mi_getopt ("-data-write-memory", argc, argv, opts,
- &optind, &optarg);
+ &oind, &oarg);
if (opt < 0)
break;
switch ((enum opt) opt)
{
case OFFSET_OPT:
- offset = atol (optarg);
+ offset = atol (oarg);
break;
}
}
- argv += optind;
- argc -= optind;
+ argv += oind;
+ argc -= oind;
if (argc != 4)
error (_("-data-write-memory: Usage: "