aboutsummaryrefslogtreecommitdiff
path: root/gdb/command.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/command.h')
-rw-r--r--gdb/command.h26
1 files changed, 25 insertions, 1 deletions
diff --git a/gdb/command.h b/gdb/command.h
index 308614b..37c7ddf 100644
--- a/gdb/command.h
+++ b/gdb/command.h
@@ -110,7 +110,9 @@ enum var_types
/* Enumerated type. Can only have one of the specified values.
*VAR is a char pointer to the name of the element that we
find. */
- var_enum
+ var_enum,
+ /* Color type. *VAR is a ui_file_style::color structure. */
+ var_color
};
/* A structure describing an extra literal accepted and shown in place
@@ -184,6 +186,14 @@ inline bool var_type_uses<const char *> (var_types t)
return t == var_enum;
}
+/* Return true if a setting of type T is backed by an ui_file_style::color
+ variable. */
+template<>
+inline bool var_type_uses<ui_file_style::color> (var_types t)
+{
+ return t == var_color;
+}
+
template<bool is_scalar, typename T> struct setting_func_types_1;
template<typename T>
@@ -680,6 +690,20 @@ extern set_show_commands add_setshow_enum_cmd
setting_func_types<const char *>::get get_func, show_value_ftype *show_func,
cmd_list_element **set_list, cmd_list_element **show_list);
+extern set_show_commands add_setshow_color_cmd
+ (const char *name, command_class theclass, ui_file_style::color *var,
+ const char *set_doc, const char *show_doc, const char *help_doc,
+ cmd_func_ftype *set_func, show_value_ftype *show_func,
+ cmd_list_element **set_list, cmd_list_element **show_list);
+
+extern set_show_commands add_setshow_color_cmd
+ (const char *name, command_class theclass,
+ const char *set_doc, const char *show_doc, const char *help_doc,
+ setting_func_types<ui_file_style::color>::set set_func,
+ setting_func_types<ui_file_style::color>::get get_func,
+ show_value_ftype *show_func, cmd_list_element **set_list,
+ cmd_list_element **show_list);
+
extern set_show_commands add_setshow_auto_boolean_cmd
(const char *name, command_class theclass, auto_boolean *var,
const char *set_doc, const char *show_doc, const char *help_doc,