aboutsummaryrefslogtreecommitdiff
path: root/gdb/command.h
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2000-06-23 08:12:27 +0000
committerAndrew Cagney <cagney@redhat.com>2000-06-23 08:12:27 +0000
commit97c3646ff2a8b36e658651abdc0cd8f3c893dc44 (patch)
treeb22716dc60d86e8a9554c2359eb2e04a03a29ade /gdb/command.h
parentf09ded24229f68245da53149e1ac46a8066057cd (diff)
downloadgdb-97c3646ff2a8b36e658651abdc0cd8f3c893dc44.zip
gdb-97c3646ff2a8b36e658651abdc0cd8f3c893dc44.tar.gz
gdb-97c3646ff2a8b36e658651abdc0cd8f3c893dc44.tar.bz2
Add support for auto_boolean (true, false or auto).
Diffstat (limited to 'gdb/command.h')
-rw-r--r--gdb/command.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/gdb/command.h b/gdb/command.h
index 469df9f..bbafe1b 100644
--- a/gdb/command.h
+++ b/gdb/command.h
@@ -47,12 +47,28 @@ typedef enum cmd_types
}
cmd_types;
+/* Reasonable values for an AUTO_BOOLEAN variable. */
+enum cmd_auto_boolean
+{
+ CMD_AUTO_BOOLEAN_TRUE,
+ CMD_AUTO_BOOLEAN_FALSE,
+ CMD_AUTO_BOOLEAN_AUTO
+};
+
/* Types of "set" or "show" command. */
typedef enum var_types
{
/* "on" or "off". *VAR is an integer which is nonzero for on,
zero for off. */
var_boolean,
+
+ /* "on" / "true" / "enable" or "off" / "false" / "disable" or
+ "auto. *VAR is an ``enum cmd_auto_boolean''. NOTE: In general
+ a custom show command will need to be implemented - one that
+ for "auto" prints both the "auto" and the current auto-selected
+ value. */
+ var_auto_boolean,
+
/* Unsigned Integer. *VAR is an unsigned int. The user can type 0
to mean "unlimited", which is stored in *VAR as UINT_MAX. */
var_uinteger,
@@ -299,6 +315,12 @@ extern struct cmd_list_element *add_set_enum_cmd (char *name,
char *doc,
struct cmd_list_element **list);
+extern struct cmd_list_element *add_set_auto_boolean_cmd (char *name,
+ enum command_class class,
+ enum cmd_auto_boolean *var,
+ char *doc,
+ struct cmd_list_element **list);
+
extern struct cmd_list_element *add_show_from_set (struct cmd_list_element *,
struct cmd_list_element
**);