mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 20:28:28 +08:00
* mi/mi-cmd-break.c (mi_cmd_break_insert): Rename `optind' and
`optparg' to `oind' and `oparg', respectively(-Wshadow). (mi_cmd_break_watch): Ditto.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2011-12-16 Andrey Smirnov <andrew.smirnov@gmail.com>
|
||||||
|
|
||||||
|
* mi/mi-cmd-break.c (mi_cmd_break_insert): Rename `optind' and
|
||||||
|
`optparg' to `oind' and `oparg', respectively(-Wshadow).
|
||||||
|
(mi_cmd_break_watch): Ditto.
|
||||||
|
|
||||||
2011-12-16 Tom Tromey <tromey@redhat.com>
|
2011-12-16 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* linespec.c (collect_symbols): Call maybe_add_address after
|
* linespec.c (collect_symbols): Call maybe_add_address after
|
||||||
|
@ -99,13 +99,13 @@ mi_cmd_break_insert (char *command, char **argv, int argc)
|
|||||||
|
|
||||||
/* Parse arguments. It could be -r or -h or -t, <location> or ``--''
|
/* Parse arguments. It could be -r or -h or -t, <location> or ``--''
|
||||||
to denote the end of the option list. */
|
to denote the end of the option list. */
|
||||||
int optind = 0;
|
int oind = 0;
|
||||||
char *optarg;
|
char *oarg;
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
int opt = mi_getopt ("-break-insert", argc, argv,
|
int opt = mi_getopt ("-break-insert", argc, argv,
|
||||||
opts, &optind, &optarg);
|
opts, &oind, &oarg);
|
||||||
if (opt < 0)
|
if (opt < 0)
|
||||||
break;
|
break;
|
||||||
switch ((enum opt) opt)
|
switch ((enum opt) opt)
|
||||||
@ -117,13 +117,13 @@ mi_cmd_break_insert (char *command, char **argv, int argc)
|
|||||||
hardware = 1;
|
hardware = 1;
|
||||||
break;
|
break;
|
||||||
case CONDITION_OPT:
|
case CONDITION_OPT:
|
||||||
condition = optarg;
|
condition = oarg;
|
||||||
break;
|
break;
|
||||||
case IGNORE_COUNT_OPT:
|
case IGNORE_COUNT_OPT:
|
||||||
ignore_count = atol (optarg);
|
ignore_count = atol (oarg);
|
||||||
break;
|
break;
|
||||||
case THREAD_OPT:
|
case THREAD_OPT:
|
||||||
thread = atol (optarg);
|
thread = atol (oarg);
|
||||||
break;
|
break;
|
||||||
case PENDING_OPT:
|
case PENDING_OPT:
|
||||||
pending = 1;
|
pending = 1;
|
||||||
@ -137,11 +137,11 @@ mi_cmd_break_insert (char *command, char **argv, int argc)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (optind >= argc)
|
if (oind >= argc)
|
||||||
error (_("-break-insert: Missing <location>"));
|
error (_("-break-insert: Missing <location>"));
|
||||||
if (optind < argc - 1)
|
if (oind < argc - 1)
|
||||||
error (_("-break-insert: Garbage following <location>"));
|
error (_("-break-insert: Garbage following <location>"));
|
||||||
address = argv[optind];
|
address = argv[oind];
|
||||||
|
|
||||||
/* Now we have what we need, let's insert the breakpoint! */
|
/* Now we have what we need, let's insert the breakpoint! */
|
||||||
if (! mi_breakpoint_observers_installed)
|
if (! mi_breakpoint_observers_installed)
|
||||||
@ -229,13 +229,13 @@ mi_cmd_break_watch (char *command, char **argv, int argc)
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* Parse arguments. */
|
/* Parse arguments. */
|
||||||
int optind = 0;
|
int oind = 0;
|
||||||
char *optarg;
|
char *oarg;
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
int opt = mi_getopt ("-break-watch", argc, argv,
|
int opt = mi_getopt ("-break-watch", argc, argv,
|
||||||
opts, &optind, &optarg);
|
opts, &oind, &oarg);
|
||||||
|
|
||||||
if (opt < 0)
|
if (opt < 0)
|
||||||
break;
|
break;
|
||||||
@ -249,11 +249,11 @@ mi_cmd_break_watch (char *command, char **argv, int argc)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (optind >= argc)
|
if (oind >= argc)
|
||||||
error (_("-break-watch: Missing <expression>"));
|
error (_("-break-watch: Missing <expression>"));
|
||||||
if (optind < argc - 1)
|
if (oind < argc - 1)
|
||||||
error (_("-break-watch: Garbage following <expression>"));
|
error (_("-break-watch: Garbage following <expression>"));
|
||||||
expr = argv[optind];
|
expr = argv[oind];
|
||||||
|
|
||||||
/* Now we have what we need, let's insert the watchpoint! */
|
/* Now we have what we need, let's insert the watchpoint! */
|
||||||
switch (type)
|
switch (type)
|
||||||
|
Reference in New Issue
Block a user