int *nfound);
static void help_cmd_list (struct cmd_list_element *list,
- enum command_class theclass,
+ command_classes theclass,
bool recurse,
struct ui_file *stream);
of *LIST). */
static struct cmd_list_element *
-do_add_cmd (const char *name, enum command_class theclass,
+do_add_cmd (const char *name, command_classes theclass,
const char *doc, struct cmd_list_element **list)
{
struct cmd_list_element *c = new struct cmd_list_element (name, theclass,
}
struct cmd_list_element *
-add_cmd (const char *name, enum command_class theclass,
+add_cmd (const char *name, command_classes theclass,
const char *doc, struct cmd_list_element **list)
{
cmd_list_element *result = do_add_cmd (name, theclass, doc, list);
}
struct cmd_list_element *
-add_cmd (const char *name, enum command_class theclass,
+add_cmd (const char *name, command_classes theclass,
cmd_simple_func_ftype *fun,
const char *doc, struct cmd_list_element **list)
{
/* Add an element with a suppress notification to the LIST of commands. */
struct cmd_list_element *
-add_cmd_suppress_notification (const char *name, enum command_class theclass,
+add_cmd_suppress_notification (const char *name, command_classes theclass,
cmd_simple_func_ftype *fun, const char *doc,
struct cmd_list_element **list,
bool *suppress_notification)
struct cmd_list_element *
add_alias_cmd (const char *name, cmd_list_element *target,
- enum command_class theclass, int abbrev_flag,
+ command_classes theclass, int abbrev_flag,
struct cmd_list_element **list)
{
gdb_assert (target != nullptr);
containing that list. */
struct cmd_list_element *
-add_prefix_cmd (const char *name, enum command_class theclass,
+add_prefix_cmd (const char *name, command_classes theclass,
cmd_simple_func_ftype *fun,
const char *doc, struct cmd_list_element **subcommands,
int allow_unknown, struct cmd_list_element **list)
/* See command.h. */
struct cmd_list_element *
-add_basic_prefix_cmd (const char *name, enum command_class theclass,
+add_basic_prefix_cmd (const char *name, command_classes theclass,
const char *doc, struct cmd_list_element **subcommands,
int allow_unknown, struct cmd_list_element **list)
{
/* See command.h. */
struct cmd_list_element *
-add_show_prefix_cmd (const char *name, enum command_class theclass,
+add_show_prefix_cmd (const char *name, command_classes theclass,
const char *doc, struct cmd_list_element **subcommands,
int allow_unknown, struct cmd_list_element **list)
{
/* See command.h. */
set_show_commands
-add_setshow_prefix_cmd (const char *name, command_class theclass,
+add_setshow_prefix_cmd (const char *name, command_classes theclass,
const char *set_doc, const char *show_doc,
cmd_list_element **set_subcommands_list,
cmd_list_element **show_subcommands_list,
struct cmd_list_element *
add_prefix_cmd_suppress_notification
- (const char *name, enum command_class theclass,
+ (const char *name, command_classes theclass,
cmd_simple_func_ftype *fun,
const char *doc, struct cmd_list_element **subcommands,
int allow_unknown, struct cmd_list_element **list,
/* Like add_prefix_cmd but sets the abbrev_flag on the new command. */
struct cmd_list_element *
-add_abbrev_prefix_cmd (const char *name, enum command_class theclass,
+add_abbrev_prefix_cmd (const char *name, command_classes theclass,
cmd_simple_func_ftype *fun, const char *doc,
struct cmd_list_element **subcommands,
int allow_unknown, struct cmd_list_element **list)
static struct cmd_list_element *
add_set_or_show_cmd (const char *name,
enum cmd_types type,
- enum command_class theclass,
+ command_classes theclass,
var_types var_type,
const literal_def *extra_literals,
const setting::erased_args &arg,
static set_show_commands
add_setshow_cmd_full_erased (const char *name,
- enum command_class theclass,
+ command_classes theclass,
var_types var_type,
const literal_def *extra_literals,
const setting::erased_args &args,
template<typename T>
static set_show_commands
add_setshow_cmd_full (const char *name,
- enum command_class theclass,
+ command_classes theclass,
var_types var_type, T *var,
const literal_def *extra_literals,
const char *set_doc, const char *show_doc,
template<typename T>
static set_show_commands
add_setshow_cmd_full (const char *name,
- enum command_class theclass,
+ command_classes theclass,
var_types var_type, T *var,
const char *set_doc, const char *show_doc,
const char *help_doc,
set_show_commands
add_setshow_enum_cmd (const char *name,
- enum command_class theclass,
+ command_classes theclass,
const char *const *enumlist,
const char **var,
const char *set_doc,
to a global storage buffer. */
set_show_commands
-add_setshow_enum_cmd (const char *name, command_class theclass,
+add_setshow_enum_cmd (const char *name, command_classes theclass,
const char *const *enumlist, const char *set_doc,
const char *show_doc, const char *help_doc,
setting_func_types<const char *>::set set_func,
set_show_commands
add_setshow_color_cmd (const char *name,
- enum command_class theclass,
+ command_classes theclass,
ui_file_style::color *var,
const char *set_doc,
const char *show_doc,
to a global storage buffer. */
set_show_commands
-add_setshow_color_cmd (const char *name, command_class theclass,
+add_setshow_color_cmd (const char *name, command_classes theclass,
const char *set_doc, const char *show_doc,
const char *help_doc,
setting_func_types<ui_file_style::color>::set set_func,
set_show_commands
add_setshow_auto_boolean_cmd (const char *name,
- enum command_class theclass,
+ command_classes theclass,
enum auto_boolean *var,
const char *set_doc, const char *show_doc,
const char *help_doc,
to a global storage buffer. */
set_show_commands
-add_setshow_auto_boolean_cmd (const char *name, command_class theclass,
+add_setshow_auto_boolean_cmd (const char *name, command_classes theclass,
const char *set_doc, const char *show_doc,
const char *help_doc,
setting_func_types<enum auto_boolean>::set set_func,
Returns the new command element. */
set_show_commands
-add_setshow_boolean_cmd (const char *name, enum command_class theclass, bool *var,
+add_setshow_boolean_cmd (const char *name, command_classes theclass, bool *var,
const char *set_doc, const char *show_doc,
const char *help_doc,
cmd_func_ftype *set_func,
to a global storage buffer. */
set_show_commands
-add_setshow_boolean_cmd (const char *name, command_class theclass,
+add_setshow_boolean_cmd (const char *name, command_classes theclass,
const char *set_doc, const char *show_doc,
const char *help_doc,
setting_func_types<bool>::set set_func,
list for set/show or some sublist thereof). */
set_show_commands
-add_setshow_filename_cmd (const char *name, enum command_class theclass,
+add_setshow_filename_cmd (const char *name, command_classes theclass,
std::string *var,
const char *set_doc, const char *show_doc,
const char *help_doc,
to a global storage buffer. */
set_show_commands
-add_setshow_filename_cmd (const char *name, command_class theclass,
+add_setshow_filename_cmd (const char *name, command_classes theclass,
const char *set_doc, const char *show_doc,
const char *help_doc,
setting_func_types<std::string>::set set_func,
list for set/show or some sublist thereof). */
set_show_commands
-add_setshow_string_cmd (const char *name, enum command_class theclass,
+add_setshow_string_cmd (const char *name, command_classes theclass,
std::string *var,
const char *set_doc, const char *show_doc,
const char *help_doc,
to a global storage buffer. */
set_show_commands
-add_setshow_string_cmd (const char *name, command_class theclass,
+add_setshow_string_cmd (const char *name, command_classes theclass,
const char *set_doc, const char *show_doc,
const char *help_doc,
setting_func_types<std::string>::set set_func,
list for set/show or some sublist thereof). */
set_show_commands
-add_setshow_string_noescape_cmd (const char *name, enum command_class theclass,
+add_setshow_string_noescape_cmd (const char *name, command_classes theclass,
std::string *var,
const char *set_doc, const char *show_doc,
const char *help_doc,
to a global storage buffer. */
set_show_commands
-add_setshow_string_noescape_cmd (const char *name, command_class theclass,
+add_setshow_string_noescape_cmd (const char *name, command_classes theclass,
const char *set_doc, const char *show_doc,
const char *help_doc,
setting_func_types<std::string>::set set_func,
list for set/show or some sublist thereof). */
set_show_commands
-add_setshow_optional_filename_cmd (const char *name, enum command_class theclass,
+add_setshow_optional_filename_cmd (const char *name, command_classes theclass,
std::string *var,
const char *set_doc, const char *show_doc,
const char *help_doc,
to a global storage buffer. */
set_show_commands
-add_setshow_optional_filename_cmd (const char *name, command_class theclass,
+add_setshow_optional_filename_cmd (const char *name, command_classes theclass,
const char *set_doc, const char *show_doc,
const char *help_doc,
setting_func_types<std::string>::set set_func,
function is only used in Python API. Please don't use it elsewhere. */
set_show_commands
-add_setshow_integer_cmd (const char *name, enum command_class theclass,
+add_setshow_integer_cmd (const char *name, command_classes theclass,
int *var, const literal_def *extra_literals,
const char *set_doc, const char *show_doc,
const char *help_doc,
to a global storage buffer. */
set_show_commands
-add_setshow_integer_cmd (const char *name, command_class theclass,
+add_setshow_integer_cmd (const char *name, command_classes theclass,
const literal_def *extra_literals,
const char *set_doc, const char *show_doc,
const char *help_doc,
to a global storage buffer. */
set_show_commands
-add_setshow_integer_cmd (const char *name, enum command_class theclass,
+add_setshow_integer_cmd (const char *name, command_classes theclass,
int *var,
const char *set_doc, const char *show_doc,
const char *help_doc,
to a global storage buffer. */
set_show_commands
-add_setshow_integer_cmd (const char *name, command_class theclass,
+add_setshow_integer_cmd (const char *name, command_classes theclass,
const char *set_doc, const char *show_doc,
const char *help_doc,
setting_func_types<int>::set set_func,
value. SET_DOC and SHOW_DOC are the documentation strings. */
set_show_commands
-add_setshow_pinteger_cmd (const char *name, enum command_class theclass,
+add_setshow_pinteger_cmd (const char *name, command_classes theclass,
int *var, const literal_def *extra_literals,
const char *set_doc, const char *show_doc,
const char *help_doc,
to a global storage buffer. */
set_show_commands
-add_setshow_pinteger_cmd (const char *name, command_class theclass,
+add_setshow_pinteger_cmd (const char *name, command_classes theclass,
const literal_def *extra_literals,
const char *set_doc, const char *show_doc,
const char *help_doc,
value. SET_DOC and SHOW_DOC are the documentation strings. */
set_show_commands
-add_setshow_uinteger_cmd (const char *name, enum command_class theclass,
+add_setshow_uinteger_cmd (const char *name, command_classes theclass,
unsigned int *var, const literal_def *extra_literals,
const char *set_doc, const char *show_doc,
const char *help_doc,
to a global storage buffer. */
set_show_commands
-add_setshow_uinteger_cmd (const char *name, command_class theclass,
+add_setshow_uinteger_cmd (const char *name, command_classes theclass,
const literal_def *extra_literals,
const char *set_doc, const char *show_doc,
const char *help_doc,
to a global storage buffer. */
set_show_commands
-add_setshow_uinteger_cmd (const char *name, enum command_class theclass,
+add_setshow_uinteger_cmd (const char *name, command_classes theclass,
unsigned int *var,
const char *set_doc, const char *show_doc,
const char *help_doc,
to a global storage buffer. */
set_show_commands
-add_setshow_uinteger_cmd (const char *name, command_class theclass,
+add_setshow_uinteger_cmd (const char *name, command_classes theclass,
const char *set_doc, const char *show_doc,
const char *help_doc,
setting_func_types<unsigned int>::set set_func,
value. SET_DOC and SHOW_DOC are the documentation strings. */
set_show_commands
-add_setshow_zinteger_cmd (const char *name, enum command_class theclass,
+add_setshow_zinteger_cmd (const char *name, command_classes theclass,
int *var,
const char *set_doc, const char *show_doc,
const char *help_doc,
to a global storage buffer. */
set_show_commands
-add_setshow_zinteger_cmd (const char *name, command_class theclass,
+add_setshow_zinteger_cmd (const char *name, command_classes theclass,
const char *set_doc, const char *show_doc,
const char *help_doc,
setting_func_types<int>::set set_func,
set_show_commands
add_setshow_zuinteger_unlimited_cmd (const char *name,
- enum command_class theclass,
+ command_classes theclass,
int *var,
const char *set_doc,
const char *show_doc,
to a global storage buffer. */
set_show_commands
-add_setshow_zuinteger_unlimited_cmd (const char *name, command_class theclass,
+add_setshow_zuinteger_unlimited_cmd (const char *name, command_classes theclass,
const char *set_doc, const char *show_doc,
const char *help_doc,
setting_func_types<int>::set set_func,
value. SET_DOC and SHOW_DOC are the documentation strings. */
set_show_commands
-add_setshow_zuinteger_cmd (const char *name, enum command_class theclass,
+add_setshow_zuinteger_cmd (const char *name, command_classes theclass,
unsigned int *var,
const char *set_doc, const char *show_doc,
const char *help_doc,
to a global storage buffer. */
set_show_commands
-add_setshow_zuinteger_cmd (const char *name, command_class theclass,
+add_setshow_zuinteger_cmd (const char *name, command_classes theclass,
const char *set_doc, const char *show_doc,
const char *help_doc,
setting_func_types<unsigned int>::set set_func,
/* Add an element to the list of commands. */
struct cmd_list_element *
-add_com (const char *name, enum command_class theclass,
+add_com (const char *name, command_classes theclass,
cmd_simple_func_ftype *fun,
const char *doc)
{
cmd_list_element *
add_com_alias (const char *name, cmd_list_element *target,
- command_class theclass, int abbrev_flag)
+ command_classes theclass, int abbrev_flag)
{
return add_alias_cmd (name, target, theclass, abbrev_flag, &cmdlist);
}
/* Add an element with a suppress notification to the list of commands. */
struct cmd_list_element *
-add_com_suppress_notification (const char *name, enum command_class theclass,
+add_com_suppress_notification (const char *name, command_classes theclass,
cmd_simple_func_ftype *fun, const char *doc,
bool *suppress_notification)
{
If you call this routine with a class >= 0, it recurses. */
void
help_list (struct cmd_list_element *list, const char *cmdtype,
- enum command_class theclass, struct ui_file *stream)
+ command_classes theclass, struct ui_file *stream)
{
int len = strlen (cmdtype);
const char *space = "";
styled_string (command_style.style (), cmdtype),
prefix);
- help_cmd_list (list, theclass, theclass >= 0, stream);
+ bool recurse = (theclass != all_commands) && (theclass != all_classes);
+ help_cmd_list (list, theclass, recurse, stream);
if (theclass == all_classes)
{
*/
static void
-help_cmd_list (struct cmd_list_element *list, enum command_class theclass,
+help_cmd_list (struct cmd_list_element *list, command_classes theclass,
bool recurse, struct ui_file *stream)
{
struct cmd_list_element *c;
continue;
}
- if (c->is_alias () && theclass != class_alias)
+ if (c->is_alias () && ((theclass & class_alias) == 0))
{
/* Do not show an alias, unless specifically showing the
list of aliases: for all other classes, an alias is
if (theclass == all_commands
|| (theclass == all_classes && c->is_command_class_help ())
- || (theclass == c->theclass && !c->is_command_class_help ()))
+ || ((theclass & c->theclass) != 0 && !c->is_command_class_help ()))
{
/* show C when
- showing all commands
list of sub-commands of the aliased command. */
print_help_for_command
(*c,
- recurse && (theclass != class_alias || !c->is_alias ()),
+ recurse && (((theclass & class_alias) == 0) || !c->is_alias ()),
stream);
continue;
}
if (recurse
- && (theclass == class_user || theclass == class_alias)
+ && ((theclass & (class_user | class_alias)) != 0)
&& c->is_prefix ())
{
/* User-defined commands or aliases may be subcommands. */
int
cli_user_command_p (struct cmd_list_element *cmd)
{
- return cmd->theclass == class_user && cmd->func == do_simple_func;
+ return (cmd->theclass & class_user) != 0 && cmd->func == do_simple_func;
}
/* See cli-decode.h. */
struct cmd_list_element
{
- cmd_list_element (const char *name_, enum command_class theclass_,
+ cmd_list_element (const char *name_, command_classes theclass_,
const char *doc_)
: name (name_),
theclass (theclass_),
/* Name of this command. */
const char *name;
- /* Command class; class values are chosen by application program. */
- enum command_class theclass;
+ /* Command classes; class values are chosen by application program
+ and are stored as a bitmask. */
+ command_classes theclass;
/* When 1 indicated that this command is deprecated. It may be
removed from gdb's command set in the future. */
struct cmd_list_element *c;
struct dump_context *d;
- c = add_cmd (name, all_commands, descr, &dump_cmdlist);
+ c = add_cmd (name, no_class, descr, &dump_cmdlist);
set_cmd_completer (c, deprecated_filename_completer);
d = XNEW (struct dump_context);
d->func = func;
c->set_context (d);
c->func = call_dump_func;
- c = add_cmd (name, all_commands, descr, &append_cmdlist);
+ c = add_cmd (name, no_class, descr, &append_cmdlist);
set_cmd_completer (c, deprecated_filename_completer);
d = XNEW (struct dump_context);
d->func = func;
Arguments are FILE EXPRESSION. Writes the value of EXPRESSION to\n\
the specified FILE in raw target ordered bytes.");
- add_basic_prefix_cmd ("srec", all_commands,
+ add_basic_prefix_cmd ("srec", no_class,
_("Write target code/data to an srec file."),
&srec_cmdlist,
0 /*allow-unknown*/,
&dump_cmdlist);
- add_basic_prefix_cmd ("ihex", all_commands,
+ add_basic_prefix_cmd ("ihex", no_class,
_("Write target code/data to an intel hex file."),
&ihex_cmdlist,
0 /*allow-unknown*/,
&dump_cmdlist);
- add_basic_prefix_cmd ("verilog", all_commands,
+ add_basic_prefix_cmd ("verilog", no_class,
_("Write target code/data to a verilog hex file."),
&verilog_cmdlist,
0 /*allow-unknown*/,
&dump_cmdlist);
- add_basic_prefix_cmd ("tekhex", all_commands,
+ add_basic_prefix_cmd ("tekhex", no_class,
_("Write target code/data to a tekhex file."),
&tekhex_cmdlist,
0 /*allow-unknown*/,
&dump_cmdlist);
- add_basic_prefix_cmd ("binary", all_commands,
+ add_basic_prefix_cmd ("binary", no_class,
_("Write target code/data to a raw binary file."),
&binary_dump_cmdlist,
0 /*allow-unknown*/,
&dump_cmdlist);
- add_basic_prefix_cmd ("binary", all_commands,
+ add_basic_prefix_cmd ("binary", no_class,
_("Append target code/data to a raw binary file."),
&binary_append_cmdlist,
0 /*allow-unknown*/,
&append_cmdlist);
- add_cmd ("memory", all_commands, dump_srec_memory, _("\
+ add_cmd ("memory", no_class, dump_srec_memory, _("\
Write contents of memory to an srec file.\n\
Arguments are FILE START STOP. Writes the contents of memory\n\
within the range [START .. STOP) to the specified FILE in srec format."),
&srec_cmdlist);
- add_cmd ("value", all_commands, dump_srec_value, _("\
+ add_cmd ("value", no_class, dump_srec_value, _("\
Write the value of an expression to an srec file.\n\
Arguments are FILE EXPRESSION. Writes the value of EXPRESSION\n\
to the specified FILE in srec format."),
&srec_cmdlist);
- add_cmd ("memory", all_commands, dump_ihex_memory, _("\
+ add_cmd ("memory", no_class, dump_ihex_memory, _("\
Write contents of memory to an ihex file.\n\
Arguments are FILE START STOP. Writes the contents of memory within\n\
the range [START .. STOP) to the specified FILE in intel hex format."),
&ihex_cmdlist);
- add_cmd ("value", all_commands, dump_ihex_value, _("\
+ add_cmd ("value", no_class, dump_ihex_value, _("\
Write the value of an expression to an ihex file.\n\
Arguments are FILE EXPRESSION. Writes the value of EXPRESSION\n\
to the specified FILE in intel hex format."),
&ihex_cmdlist);
- add_cmd ("memory", all_commands, dump_verilog_memory, _("\
+ add_cmd ("memory", no_class, dump_verilog_memory, _("\
Write contents of memory to a verilog hex file.\n\
Arguments are FILE START STOP. Writes the contents of memory within\n\
the range [START .. STOP) to the specified FILE in verilog hex format."),
&verilog_cmdlist);
- add_cmd ("value", all_commands, dump_verilog_value, _("\
+ add_cmd ("value", no_class, dump_verilog_value, _("\
Write the value of an expression to a verilog hex file.\n\
Arguments are FILE EXPRESSION. Writes the value of EXPRESSION\n\
to the specified FILE in verilog hex format."),
&verilog_cmdlist);
- add_cmd ("memory", all_commands, dump_tekhex_memory, _("\
+ add_cmd ("memory", no_class, dump_tekhex_memory, _("\
Write contents of memory to a tekhex file.\n\
Arguments are FILE START STOP. Writes the contents of memory\n\
within the range [START .. STOP) to the specified FILE in tekhex format."),
&tekhex_cmdlist);
- add_cmd ("value", all_commands, dump_tekhex_value, _("\
+ add_cmd ("value", no_class, dump_tekhex_value, _("\
Write the value of an expression to a tekhex file.\n\
Arguments are FILE EXPRESSION. Writes the value of EXPRESSION\n\
to the specified FILE in tekhex format."),
&tekhex_cmdlist);
- add_cmd ("memory", all_commands, dump_binary_memory, _("\
+ add_cmd ("memory", no_class, dump_binary_memory, _("\
Write contents of memory to a raw binary file.\n\
Arguments are FILE START STOP. Writes the contents of memory\n\
within the range [START .. STOP) to the specified FILE in binary format."),
&binary_dump_cmdlist);
- add_cmd ("value", all_commands, dump_binary_value, _("\
+ add_cmd ("value", no_class, dump_binary_value, _("\
Write the value of an expression to a raw binary file.\n\
Arguments are FILE EXPRESSION. Writes the value of EXPRESSION\n\
to the specified FILE in raw target ordered bytes."),
&binary_dump_cmdlist);
- add_cmd ("memory", all_commands, append_binary_memory, _("\
+ add_cmd ("memory", no_class, append_binary_memory, _("\
Append contents of memory to a raw binary file.\n\
Arguments are FILE START STOP. Writes the contents of memory within the\n\
range [START .. STOP) to the specified FILE in raw target ordered bytes."),
&binary_append_cmdlist);
- add_cmd ("value", all_commands, append_binary_value, _("\
+ add_cmd ("value", no_class, append_binary_value, _("\
Append the value of an expression to a raw binary file.\n\
Arguments are FILE EXPRESSION. Writes the value of EXPRESSION\n\
to the specified FILE in raw target ordered bytes."),
Note that help accepts unambiguous abbreviated class names. */
/* Special classes to help_list */
- all_classes = -2, /* help without <classname> */
- all_commands = -1, /* all */
+ all_classes = 0, /* help without <classname> */
+ all_commands = ~0, /* all */
/* Classes of commands */
- no_class = -1,
- class_run = 0, /* running */
- class_vars, /* data */
- class_stack, /* stack */
- class_files, /* files */
- class_support, /* support */
- class_info, /* status */
- class_breakpoint, /* breakpoints */
- class_trace, /* tracepoints */
- class_alias, /* aliases */
- class_bookmark,
- class_obscure, /* obscure */
- class_maintenance, /* internals */
- class_tui, /* text-user-interface */
- class_user, /* user-defined */
+ no_class = 1 << 0,
+ class_run = 1 << 1, /* running */
+ class_vars = 1 << 2, /* data */
+ class_stack = 1 << 3, /* stack */
+ class_files = 1 << 4, /* files */
+ class_support = 1 << 5, /* support */
+ class_info = 1 << 6, /* status */
+ class_breakpoint = 1 << 7, /* breakpoints */
+ class_trace = 1 << 8, /* tracepoints */
+ class_alias = 1 << 9, /* aliases */
+ class_bookmark = 1 << 10,
+ class_obscure = 1 << 11, /* obscure */
+ class_maintenance = 1 << 12, /* internals */
+ class_tui = 1 << 13, /* text-user-interface */
+ class_user = 1 << 14, /* user-defined */
/* Used for "show" commands that have no corresponding "set" command. */
- no_set_class
+ no_set_class = 1 << 15
};
+DEF_ENUM_FLAGS_TYPE (enum command_class, command_classes);
/* Types of "set" or "show" command. */
enum var_types
/* Const-correct variant of the above. */
-extern struct cmd_list_element *add_cmd (const char *, enum command_class,
+extern struct cmd_list_element *add_cmd (const char *, command_classes,
cmd_simple_func_ftype *fun,
const char *,
struct cmd_list_element **);
/* Like add_cmd, but no command function is specified. */
-extern struct cmd_list_element *add_cmd (const char *, enum command_class,
+extern struct cmd_list_element *add_cmd (const char *, command_classes,
const char *,
struct cmd_list_element **);
extern struct cmd_list_element *add_cmd_suppress_notification
- (const char *name, enum command_class theclass,
+ (const char *name, command_classes theclass,
cmd_simple_func_ftype *fun, const char *doc,
struct cmd_list_element **list,
bool *suppress_notification);
extern struct cmd_list_element *add_alias_cmd (const char *,
cmd_list_element *,
- enum command_class, int,
+ command_classes, int,
struct cmd_list_element **);
-extern struct cmd_list_element *add_prefix_cmd (const char *, enum command_class,
+extern struct cmd_list_element *add_prefix_cmd (const char *, command_classes,
cmd_simple_func_ftype *fun,
const char *,
struct cmd_list_element **,
simply calls help_list. */
extern struct cmd_list_element *add_basic_prefix_cmd
- (const char *, enum command_class, const char *, struct cmd_list_element **,
+ (const char *, command_classes, const char *, struct cmd_list_element **,
int, struct cmd_list_element **);
/* Like add_prefix_cmd, but useful for "show" prefixes. This sets the
callback to a function that simply calls cmd_show_list. */
extern struct cmd_list_element *add_show_prefix_cmd
- (const char *, enum command_class, const char *, struct cmd_list_element **,
+ (const char *, command_classes, const char *, struct cmd_list_element **,
int, struct cmd_list_element **);
/* Add matching set and show commands using add_basic_prefix_cmd and
add_show_prefix_cmd. */
extern set_show_commands add_setshow_prefix_cmd
- (const char *name, command_class theclass, const char *set_doc,
+ (const char *name, command_classes theclass, const char *set_doc,
const char *show_doc,
cmd_list_element **set_subcommands_list,
cmd_list_element **show_subcommands_list,
cmd_list_element **show_list);
extern struct cmd_list_element *add_prefix_cmd_suppress_notification
- (const char *name, enum command_class theclass,
+ (const char *name, command_classes theclass,
cmd_simple_func_ftype *fun,
const char *doc, struct cmd_list_element **subcommands,
int allow_unknown,
bool *suppress_notification);
extern struct cmd_list_element *add_abbrev_prefix_cmd (const char *,
- enum command_class,
+ command_classes,
cmd_simple_func_ftype *fun,
const char *,
struct cmd_list_element
struct cmd_list_element **prefix_cmd,
struct cmd_list_element **cmd);
-extern struct cmd_list_element *add_com (const char *, enum command_class,
+extern struct cmd_list_element *add_com (const char *, command_classes,
cmd_simple_func_ftype *fun,
const char *);
extern cmd_list_element *add_com_alias (const char *name,
cmd_list_element *target,
- command_class theclass,
+ command_classes theclass,
int abbrev_flag);
extern struct cmd_list_element *add_com_suppress_notification
- (const char *name, enum command_class theclass,
+ (const char *name, command_classes theclass,
cmd_simple_func_ftype *fun, const char *doc,
bool *suppress_notification);
/* Functions that implement commands about CLI commands. */
extern void help_list (struct cmd_list_element *, const char *,
- enum command_class, struct ui_file *);
+ command_classes, struct ui_file *);
/* Method for show a set/show variable's VALUE on FILE. */
typedef void (show_value_ftype) (struct ui_file *file,
extern const literal_def pinteger_unlimited_literals[];
extern set_show_commands add_setshow_enum_cmd
- (const char *name, command_class theclass, const char *const *enumlist,
+ (const char *name, command_classes theclass, const char *const *enumlist,
const char **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_enum_cmd
- (const char *name, command_class theclass, const char *const *enumlist,
+ (const char *name, command_classes theclass, const char *const *enumlist,
const char *set_doc, const char *show_doc,
const char *help_doc, setting_func_types<const char *>::set set_func,
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 *name, command_classes 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 *name, command_classes 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,
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 *name, command_classes theclass, auto_boolean *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_auto_boolean_cmd
- (const char *name, command_class theclass, const char *set_doc,
+ (const char *name, command_classes theclass, const char *set_doc,
const char *show_doc, const char *help_doc,
setting_func_types<enum auto_boolean>::set set_func,
setting_func_types<enum auto_boolean>::get get_func,
cmd_list_element **show_list);
extern set_show_commands add_setshow_boolean_cmd
- (const char *name, command_class theclass, bool *var, const char *set_doc,
+ (const char *name, command_classes theclass, bool *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_boolean_cmd
- (const char *name, command_class theclass, const char *set_doc,
+ (const char *name, command_classes theclass, const char *set_doc,
const char *show_doc, const char *help_doc,
setting_func_types<bool>::set set_func,
setting_func_types<bool>::get get_func, show_value_ftype *show_func,
cmd_list_element **set_list, cmd_list_element **show_list);
extern set_show_commands add_setshow_filename_cmd
- (const char *name, command_class theclass, std::string *var, const char *set_doc,
+ (const char *name, command_classes theclass, std::string *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_filename_cmd
- (const char *name, command_class theclass, const char *set_doc,
+ (const char *name, command_classes theclass, const char *set_doc,
const char *show_doc, const char *help_doc,
setting_func_types<std::string>::set set_func,
setting_func_types<std::string>::get get_func, show_value_ftype *show_func,
cmd_list_element **set_list, cmd_list_element **show_list);
extern set_show_commands add_setshow_string_cmd
- (const char *name, command_class theclass, std::string *var, const char *set_doc,
+ (const char *name, command_classes theclass, std::string *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_string_cmd
- (const char *name, command_class theclass, const char *set_doc,
+ (const char *name, command_classes theclass, const char *set_doc,
const char *show_doc, const char *help_doc,
setting_func_types<std::string>::set set_func,
setting_func_types<std::string>::get get_func,
cmd_list_element **show_list);
extern set_show_commands add_setshow_string_noescape_cmd
- (const char *name, command_class theclass, std::string *var, const char *set_doc,
+ (const char *name, command_classes theclass, std::string *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_string_noescape_cmd
- (const char *name, command_class theclass, const char *set_doc,
+ (const char *name, command_classes theclass, const char *set_doc,
const char *show_doc, const char *help_doc,
setting_func_types<std::string>::set set_func,
setting_func_types<std::string>::get get_func, show_value_ftype *show_func,
cmd_list_element **set_list, cmd_list_element **show_list);
extern set_show_commands add_setshow_optional_filename_cmd
- (const char *name, command_class theclass, std::string *var, const char *set_doc,
+ (const char *name, command_classes theclass, std::string *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_optional_filename_cmd
- (const char *name, command_class theclass, const char *set_doc,
+ (const char *name, command_classes theclass, const char *set_doc,
const char *show_doc, const char *help_doc,
setting_func_types<std::string>::set set_func,
setting_func_types<std::string>::get get_func,
cmd_list_element **show_list);
extern set_show_commands add_setshow_integer_cmd
- (const char *name, command_class theclass, int *var,
+ (const char *name, command_classes theclass, int *var,
const literal_def *extra_literals, 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_integer_cmd
- (const char *name, command_class theclass, const literal_def *extra_literals,
+ (const char *name, command_classes theclass, const literal_def *extra_literals,
const char *set_doc, const char *show_doc, const char *help_doc,
setting_func_types<int>::set set_func,
setting_func_types<int>::get get_func, show_value_ftype *show_func,
cmd_list_element **set_list, cmd_list_element **show_list);
extern set_show_commands add_setshow_integer_cmd
- (const char *name, command_class theclass, int *var, const char *set_doc,
+ (const char *name, command_classes theclass, int *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_integer_cmd
- (const char *name, command_class theclass, const char *set_doc,
+ (const char *name, command_classes theclass, const char *set_doc,
const char *show_doc, const char *help_doc,
setting_func_types<int>::set set_func,
setting_func_types<int>::get get_func, show_value_ftype *show_func,
cmd_list_element **set_list, cmd_list_element **show_list);
extern set_show_commands add_setshow_pinteger_cmd
- (const char *name, command_class theclass, int *var,
+ (const char *name, command_classes theclass, int *var,
const literal_def *extra_literals, 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_pinteger_cmd
- (const char *name, command_class theclass, const literal_def *extra_literals,
+ (const char *name, command_classes theclass, const literal_def *extra_literals,
const char *set_doc, const char *show_doc, const char *help_doc,
setting_func_types<int>::set set_func,
setting_func_types<int>::get get_func, show_value_ftype *show_func,
cmd_list_element **set_list, cmd_list_element **show_list);
extern set_show_commands add_setshow_uinteger_cmd
- (const char *name, command_class theclass, unsigned int *var,
+ (const char *name, command_classes theclass, unsigned int *var,
const literal_def *extra_literals,
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_uinteger_cmd
- (const char *name, command_class theclass, const literal_def *extra_literals,
+ (const char *name, command_classes theclass, const literal_def *extra_literals,
const char *set_doc, const char *show_doc, const char *help_doc,
setting_func_types<unsigned int>::set set_func,
setting_func_types<unsigned int>::get get_func, show_value_ftype *show_func,
cmd_list_element **set_list, cmd_list_element **show_list);
extern set_show_commands add_setshow_uinteger_cmd
- (const char *name, command_class theclass, unsigned int *var,
+ (const char *name, command_classes theclass, unsigned int *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_uinteger_cmd
- (const char *name, command_class theclass, const char *set_doc,
+ (const char *name, command_classes theclass, const char *set_doc,
const char *show_doc, const char *help_doc,
setting_func_types<unsigned int>::set set_func,
setting_func_types<unsigned int>::get get_func, show_value_ftype *show_func,
cmd_list_element **set_list, cmd_list_element **show_list);
extern set_show_commands add_setshow_zinteger_cmd
- (const char *name, command_class theclass, int *var, const char *set_doc,
+ (const char *name, command_classes theclass, int *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_zinteger_cmd
- (const char *name, command_class theclass, const char *set_doc,
+ (const char *name, command_classes theclass, const char *set_doc,
const char *show_doc, const char *help_doc,
setting_func_types<int>::set set_func,
setting_func_types<int>::get get_func, show_value_ftype *show_func,
cmd_list_element **set_list, cmd_list_element **show_list);
extern set_show_commands add_setshow_zuinteger_cmd
- (const char *name, command_class theclass, unsigned int *var,
+ (const char *name, command_classes theclass, unsigned int *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_zuinteger_cmd
- (const char *name, command_class theclass, const char *set_doc,
+ (const char *name, command_classes theclass, const char *set_doc,
const char *show_doc, const char *help_doc,
setting_func_types<unsigned int>::set set_func,
setting_func_types<unsigned int>::get get_func, show_value_ftype *show_func,
cmd_list_element **set_list, cmd_list_element **show_list);
extern set_show_commands add_setshow_zuinteger_unlimited_cmd
- (const char *name, command_class theclass, int *var, const char *set_doc,
+ (const char *name, command_classes theclass, int *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_zuinteger_unlimited_cmd
- (const char *name, command_class theclass, const char *set_doc,
+ (const char *name, command_classes theclass, const char *set_doc,
const char *show_doc, const char *help_doc,
setting_func_types<int>::set set_func, setting_func_types<int>::get get_func,
show_value_ftype *show_func, cmd_list_element **set_list,