summaryrefslogtreecommitdiff
path: root/gdb/mi/mi-getopt.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/mi/mi-getopt.h')
-rw-r--r--gdb/mi/mi-getopt.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/gdb/mi/mi-getopt.h b/gdb/mi/mi-getopt.h
index 6b31adf029a..17d66fb2654 100644
--- a/gdb/mi/mi-getopt.h
+++ b/gdb/mi/mi-getopt.h
@@ -57,4 +57,24 @@ struct mi_opt
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.
+
+ An MI function that should not recieve arguments can still be
+ passed parameters after the special option '--' such as below.
+
+ Example: The MI function -exec-run takes no args.
+ However, the client may pass '-exec-run -- -a ...'
+ See PR-783
+
+ PREFIX is passed to mi_getopt for an error message.
+
+ This function Returns 1 if the parameter pair ARGC/ARGV are valid
+ for an MI function that takes no arguments. Otherwise, it returns 0
+ and the appropriate error message is displayed by mi_getopt. */
+
+extern int mi_valid_noargs (const char *prefix, int argc, char **argv);
+
#endif