aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi/mi-getopt.h
diff options
context:
space:
mode:
authorStan Shebs <shebs@codesourcery.com>2012-03-06 22:48:53 +0000
committerStan Shebs <shebs@codesourcery.com>2012-03-06 22:48:53 +0000
commit2b03b41d6ac4781c8aac2baa37e9ec282dd0d2b0 (patch)
tree132fc8ce2c9fd9b998bc772902d0368cd81d8193 /gdb/mi/mi-getopt.h
parent3ce231f8e2a12502728fbebf0ddfaa690e986154 (diff)
downloadgdb-2b03b41d6ac4781c8aac2baa37e9ec282dd0d2b0.zip
gdb-2b03b41d6ac4781c8aac2baa37e9ec282dd0d2b0.tar.gz
gdb-2b03b41d6ac4781c8aac2baa37e9ec282dd0d2b0.tar.bz2
* mi/mi-cmd-break.c: Enforce coding standards, fix comments.
* mi/mi-cmd-disas.c: Ditto. * mi/mi-cmd-env.c: Ditto. * mi/mi-cmd-file.c: Ditto. * mi/mi-cmd-stack.c: Ditto. * mi/mi-cmd-target.c: Ditto. * mi/mi-cmd-var.c: Ditto. * mi/mi-cmds.c: Ditto. * mi/mi-cmds.h: Ditto. * mi/mi-console.c: Ditto. * mi/mi-getopt.c: Ditto. * mi/mi-getopt.h: Ditto. * mi/mi-interp.c: Ditto. * mi/mi-main.c: Ditto. * mi/mi-out.c: Ditto. * mi/mi-parse.c: Ditto. * mi/mi-parse.h: Ditto. * mi/mi-symbol-cmds.c: Ditto. * mi/mi-getopt.h: Move mi_opt struct up. * mi/mi-main.c (captured_mi_execute_command): Remove redundant return. * mi/mi-out.c (_initialize_mi_out): Remove empty initialize.
Diffstat (limited to 'gdb/mi/mi-getopt.h')
-rw-r--r--gdb/mi/mi-getopt.h34
1 files changed, 15 insertions, 19 deletions
diff --git a/gdb/mi/mi-getopt.h b/gdb/mi/mi-getopt.h
index ea09b44..bfb305d 100644
--- a/gdb/mi/mi-getopt.h
+++ b/gdb/mi/mi-getopt.h
@@ -20,6 +20,16 @@
#ifndef MI_GETOPT_H
#define MI_GETOPT_H
+/* The option list. Terminated by NAME==NULL. ARG_P that the option
+ requires an argument. INDEX is returned to identify the option. */
+
+struct mi_opt
+ {
+ const char *name;
+ int index;
+ int arg_p;
+ };
+
/* Like getopt() but with simpler semantics.
An option has the form ``-<name>''. The special option ``--''
@@ -37,30 +47,16 @@
to specify the non-option argument. OPTARG is set to NULL.
mi_getopt() calls ``error("%s: Unknown option %c", prefix,
- option)'' if an unknown option is encountered. */
+ option)'' if an unknown option is encountered. */
-struct mi_opt;
extern int mi_getopt (const char *prefix, int argc, char **argv,
const struct mi_opt *opt, int *optind, char **optarg);
-/* The option list. Terminated by NAME==NULL. ARG_P that the option
- requires an argument. INDEX is returned to identify th option. */
-
-struct mi_opt
- {
- const char *name;
- int index;
- int arg_p;
- };
-
-struct mi_opt;
-
-/* mi_valid_noargs
-
- Determines if ARGC/ARGV are a valid set of parameters to satisfy
- an MI function that is not supposed to recieve any arguments.
+/* mi_valid_noargs determines if ARGC/ARGV are a valid set of
+ parameters to satisfy an MI function that is not supposed to
+ recieve any arguments.
- An MI function that should not recieve arguments can still be
+ An MI function that should not receive arguments can still be
passed parameters after the special option '--' such as below.
Example: The MI function -exec-run takes no args.