diff options
Diffstat (limited to 'gdb/mi/mi-cmd-var.c')
-rw-r--r-- | gdb/mi/mi-cmd-var.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c index 16fbb85..48f8a7d 100644 --- a/gdb/mi/mi-cmd-var.c +++ b/gdb/mi/mi-cmd-var.c @@ -554,8 +554,8 @@ mi_cmd_var_evaluate_expression (char *command, char **argv, int argc) enum varobj_display_formats format; int formatFound; - int optind; - char *optarg; + int oind; + char *oarg; enum opt { @@ -570,11 +570,11 @@ mi_cmd_var_evaluate_expression (char *command, char **argv, int argc) /* Parse arguments */ format = FORMAT_NATURAL; formatFound = 0; - optind = 0; + oind = 0; while (1) { int opt = mi_getopt ("-var-evaluate-expression", argc, argv, - opts, &optind, &optarg); + opts, &oind, &oarg); if (opt < 0) break; @@ -584,20 +584,20 @@ mi_cmd_var_evaluate_expression (char *command, char **argv, int argc) if (formatFound) error (_("Cannot specify format more than once")); - format = mi_parse_format (optarg); + format = mi_parse_format (oarg); formatFound = 1; break; } } - if (optind >= argc) + if (oind >= argc) error (_("Usage: [-f FORMAT] NAME")); - if (optind < argc - 1) + if (oind < argc - 1) error (_("Garbage at end of command")); /* Get varobj handle, if a valid var obj name was specified */ - var = varobj_get_handle (argv[optind]); + var = varobj_get_handle (argv[oind]); if (formatFound) { |