aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi
diff options
context:
space:
mode:
authorAndrey Smirnov <ndreys@sourceware.org>2011-12-17 06:14:45 +0000
committerAndrey Smirnov <ndreys@sourceware.org>2011-12-17 06:14:45 +0000
commit56934ab1cea1a1569413c26ea3182525e4d335ed (patch)
tree53681d4283500de82cca0abe66294d3d07aa1601 /gdb/mi
parent324478caa723baa5c1cca23cb284fa928982b326 (diff)
downloadgdb-56934ab1cea1a1569413c26ea3182525e4d335ed.zip
gdb-56934ab1cea1a1569413c26ea3182525e4d335ed.tar.gz
gdb-56934ab1cea1a1569413c26ea3182525e4d335ed.tar.bz2
* 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.
Diffstat (limited to 'gdb/mi')
-rw-r--r--gdb/mi/mi-main.c56
1 files changed, 28 insertions, 28 deletions
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index eefe9ec..237e157 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -808,13 +808,13 @@ mi_cmd_list_thread_groups (char *command, char **argv, int argc)
{ 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;
@@ -824,9 +824,9 @@ mi_cmd_list_thread_groups (char *command, char **argv, int argc)
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 "
@@ -835,18 +835,18 @@ mi_cmd_list_thread_groups (char *command, char **argv, int argc)
}
}
- 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)
@@ -1303,8 +1303,8 @@ mi_cmd_data_read_memory (char *command, char **argv, int argc)
gdb_byte *mbuf;
int nr_bytes;
long offset = 0;
- int optind = 0;
- char *optarg;
+ int oind = 0;
+ char *oarg;
enum opt
{
OFFSET_OPT
@@ -1318,19 +1318,19 @@ mi_cmd_data_read_memory (char *command, char **argv, int argc)
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: "
@@ -1489,8 +1489,8 @@ mi_cmd_data_read_memory_bytes (char *command, char **argv, int argc)
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
@@ -1504,18 +1504,18 @@ mi_cmd_data_read_memory_bytes (char *command, char **argv, int argc)
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."));
@@ -1590,8 +1590,8 @@ mi_cmd_data_write_memory (char *command, char **argv, int argc)
void *buffer;
struct cleanup *old_chain;
long offset = 0;
- int optind = 0;
- char *optarg;
+ int oind = 0;
+ char *oarg;
enum opt
{
OFFSET_OPT
@@ -1605,19 +1605,19 @@ mi_cmd_data_write_memory (char *command, char **argv, int argc)
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: "