21#include "gdbsupport/gdb_regex.h"
27#include "gdbsupport/gdb_optional.h"
41 int ignore_help_classes,
66 for (p = list; p != NULL; p = p->
next)
90 bool recurse,
struct ui_file *stream);
139 if (this->
prefix !=
nullptr)
142 prefixname += this->
name;
150std::vector<std::string>
153 std::vector<std::string> result;
155 if (this->
prefix !=
nullptr)
158 result.emplace_back (std::string (this->
name));
193 alias.alias_target = c;
207 if (*list == NULL || strcmp ((*list)->name,
name) >= 0)
298 gdb_assert (target !=
nullptr);
305 c->
doc = xstrdup (target->
doc);
315 target->
aliases.push_front (*c);
429 const char *set_doc,
const char *show_doc,
438 set_subcommands_list, 0,
441 show_subcommands_list, 0,
519 c->
var.emplace (var_type, arg);
543 const char *set_doc,
const char *show_doc,
544 const char *help_doc,
552 gdb::unique_xmalloc_ptr<char> full_set_doc;
553 gdb::unique_xmalloc_ptr<char> full_show_doc;
555 if (help_doc != NULL)
557 full_set_doc = xstrprintf (
"%s\n%s", set_doc, help_doc);
558 full_show_doc = xstrprintf (
"%s\n%s", show_doc, help_doc);
562 full_set_doc = make_unique_xstrdup (set_doc);
563 full_show_doc = make_unique_xstrdup (show_doc);
566 full_set_doc.release (), set_list);
569 if (set_func != NULL)
570 set->
func = set_func;
573 full_show_doc.release (), show_list);
588 const char *set_doc,
const char *show_doc,
589 const char *help_doc,
599 set_setting_func, get_setting_func);
603 var_type, erased_args,
620 const char *
const *enumlist,
623 const char *show_doc,
624 const char *help_doc,
632 gdb_assert (
var !=
nullptr && *
var !=
nullptr);
633 for (
int i = 0; ; ++i)
635 gdb_assert (enumlist[i] !=
nullptr);
636 if (*
var == enumlist[i])
642 set_doc, show_doc, help_doc,
643 nullptr,
nullptr, set_func,
644 show_func, set_list, show_list);
654 const char *
const *enumlist,
const char *set_doc,
655 const char *show_doc,
const char *help_doc,
663 nullptr, set_doc, show_doc,
664 help_doc, set_func, get_func,
665 nullptr, show_func, set_list,
668 cmds.set->enums = enumlist;
685 const char *set_doc,
const char *show_doc,
686 const char *help_doc,
694 var, set_doc, show_doc, help_doc,
695 nullptr,
nullptr, set_func,
696 show_func, set_list, show_list);
708 const char *set_doc,
const char *show_doc,
709 const char *help_doc,
716 auto cmds = add_setshow_cmd_full<enum auto_boolean> (
name,
theclass,
722 set_list, show_list);
740 const char *set_doc,
const char *show_doc,
741 const char *help_doc,
749 set_doc, show_doc, help_doc,
750 nullptr,
nullptr, set_func, show_func,
751 set_list, show_list);
763 const char *set_doc,
const char *show_doc,
764 const char *help_doc,
772 set_doc, show_doc, help_doc,
773 set_func, get_func,
nullptr,
774 show_func, set_list, show_list);
787 const char *set_doc,
const char *show_doc,
788 const char *help_doc,
796 set_doc, show_doc, help_doc,
797 nullptr,
nullptr, set_func,
798 show_func, set_list, show_list);
810 const char *set_doc,
const char *show_doc,
811 const char *help_doc,
819 nullptr, set_doc, show_doc,
820 help_doc, set_func, get_func,
821 nullptr, show_func, set_list,
835 const char *set_doc,
const char *show_doc,
836 const char *help_doc,
844 set_doc, show_doc, help_doc,
845 nullptr,
nullptr, set_func,
846 show_func, set_list, show_list);
859 const char *set_doc,
const char *show_doc,
860 const char *help_doc,
868 nullptr, set_doc, show_doc,
869 help_doc, set_func, get_func,
870 nullptr, show_func, set_list,
885 const char *set_doc,
const char *show_doc,
886 const char *help_doc,
894 var, set_doc, show_doc, help_doc,
895 nullptr,
nullptr, set_func, show_func,
896 set_list, show_list);
909 const char *set_doc,
const char *show_doc,
910 const char *help_doc,
917 auto cmds = add_setshow_cmd_full<std::string> (
name,
theclass,
919 set_doc, show_doc, help_doc,
921 nullptr, show_func, set_list,
936 const char *set_doc,
const char *show_doc,
937 const char *help_doc,
945 var, set_doc, show_doc, help_doc,
946 nullptr,
nullptr, set_func, show_func,
947 set_list, show_list);
959 const char *set_doc,
const char *show_doc,
960 const char *help_doc,
969 nullptr, set_doc, show_doc, help_doc,
970 set_func, get_func,
nullptr, show_func,
984 const char *text,
const char *word)
986 static const char *
const keywords[] =
1006 const char *set_doc,
const char *show_doc,
1007 const char *help_doc,
1015 set_doc, show_doc, help_doc,
1016 nullptr,
nullptr, set_func,
1017 show_func, set_list, show_list);
1029 const char *set_doc,
const char *show_doc,
1030 const char *help_doc,
1038 set_doc, show_doc, help_doc, set_func,
1039 get_func,
nullptr, show_func, set_list,
1055 const char *set_doc,
const char *show_doc,
1056 const char *help_doc,
1064 set_doc, show_doc, help_doc,
1065 nullptr,
nullptr, set_func,
1066 show_func, set_list, show_list);
1078 const char *set_doc,
const char *show_doc,
1079 const char *help_doc,
1087 nullptr, set_doc, show_doc,
1088 help_doc, set_func, get_func,
1089 nullptr, show_func, set_list,
1105 const char *set_doc,
const char *show_doc,
1106 const char *help_doc,
1113 set_doc, show_doc, help_doc,
1114 nullptr,
nullptr, set_func,
1115 show_func, set_list, show_list);
1123 const char *set_doc,
const char *show_doc,
1124 const char *help_doc,
1132 set_doc, show_doc, help_doc, set_func,
1133 get_func,
nullptr, show_func, set_list,
1141 const char *set_doc,
1142 const char *show_doc,
1143 const char *help_doc,
1151 set_doc, show_doc, help_doc,
nullptr,
1152 nullptr, set_func, show_func, set_list,
1165 const char *set_doc,
const char *show_doc,
1166 const char *help_doc,
1175 nullptr, set_doc, show_doc, help_doc, set_func,
1176 get_func,
nullptr, show_func, set_list,
1192 const char *set_doc,
const char *show_doc,
1193 const char *help_doc,
1200 var, set_doc, show_doc, help_doc,
1201 nullptr,
nullptr, set_func,
1202 show_func, set_list, show_list);
1210 const char *set_doc,
const char *show_doc,
1211 const char *help_doc,
1219 nullptr, set_doc, show_doc,
1220 help_doc, set_func, get_func,
1221 nullptr, show_func, set_list,
1246 previous_chain_ptr = list;
1248 for (iter = *previous_chain_ptr; iter; iter = *previous_chain_ptr)
1250 if (strcmp (iter->
name,
name) == 0)
1265 *previous_chain_ptr = iter->
next;
1283 previous_chain_ptr = &iter->
next;
1357 gdb_assert (
alias.is_alias ());
1360 return (
alias.doc_allocated
1361 && strcmp (
alias.doc,
alias.alias_target->doc) != 0);
1387 if (!
alias.cmd_deprecated
1389 && !
alias.default_args.empty ())
1401 bool always_fput_c_name,
const char *postfix,
1413 bool print_something = always_fput_c_name;
1414 if (!print_something)
1417 if (!print_alias (
alias))
1420 print_something =
true;
1424 if (print_something)
1429 if (!print_alias (
alias))
1437 if (print_something)
1447 bool verbose, compiled_regex &highlight,
1457 verbose ?
"" :
" -- ", stream);
1483 bool verbose, compiled_regex ®ex,
const char *
prefix)
1489 for (c=commandlist;c;c=c->
next)
1500 if (c->
name != NULL)
1502 size_t name_len = strlen (c->
name);
1505 returnvalue = regex.search (c->
name, name_len, 0, name_len, NULL);
1506 if (returnvalue >= 0)
1512 name_len = strlen (
alias.name);
1513 returnvalue = regex.search (
alias.name, name_len, 0, name_len, NULL);
1514 if (returnvalue >= 0)
1521 if (c->
doc != NULL && returnvalue < 0)
1523 size_t doc_len = strlen (c->
doc);
1526 if (regex.search (c->
doc, doc_len, 0, doc_len, NULL) >= 0)
1562 if (strcmp (command,
"all") == 0)
1568 const char *orig_command = command;
1624 "\nThis command has a hook (or hooks) defined:\n");
1628 "\tThis command is run after : %s (pre hook)\n",
1632 "\tThis command is run before : %s (post hook)\n",
1653 char *cmdtype1, *cmdtype2;
1657 len = strlen (cmdtype);
1658 cmdtype1 = (
char *) alloca (len + 1);
1660 cmdtype2 = (
char *) alloca (len + 4);
1665 memcpy (cmdtype1 + 1, cmdtype, len - 1);
1667 memcpy (cmdtype2, cmdtype, len - 1);
1668 strcpy (cmdtype2 + len - 1,
" sub");
1672 gdb_printf (stream,
"List of classes of %scommands:\n\n", cmdtype2);
1674 gdb_printf (stream,
"List of %scommands:\n\n", cmdtype2);
1681Type \"help%s\" followed by a class name for a list of commands in ",
1687Type \"help all\" for the list of all commands.");
1690 gdb_printf (stream,
"\nType \"help%s\" followed by %scommand name ",
1691 cmdtype1, cmdtype2);
1697 gdb_puts (
"documentation.\n", stream);
1698 gdb_puts (
"Type \"apropos word\" to search "
1699 "for commands related to \"word\".\n", stream);
1700 gdb_puts (
"Type \"apropos -v word\" for full documentation", stream);
1702 gdb_puts (
" of commands related to \"word\".\n", stream);
1703 gdb_puts (
"Command name abbreviations are allowed if unambiguous.\n",
1711 int seen_unclassified = 0;
1738 if (!seen_unclassified)
1740 gdb_printf (stream,
"\nUnclassified commands\n\n");
1741 seen_unclassified = 1;
1753 bool for_value_prefix)
1755 static char *line_buffer = 0;
1756 static int line_size;
1762 line_buffer = (
char *)
xmalloc (line_size);
1767 while (*p && *p !=
'\n')
1769 if (p - str > line_size - 1)
1771 line_size = p - str + 1;
1772 xfree (line_buffer);
1773 line_buffer = (
char *)
xmalloc (line_size);
1775 strncpy (line_buffer, str, p - str);
1776 if (for_value_prefix)
1778 if (islower (line_buffer[0]))
1779 line_buffer[0] = toupper (line_buffer[0]);
1780 gdb_assert (p > str);
1781 if (line_buffer[p - str - 1] ==
'.')
1782 line_buffer[p - str - 1] =
'\0';
1784 line_buffer[p - str] =
'\0';
1787 line_buffer[p - str] =
'\0';
1796 bool recurse,
struct ui_file *stream)
1835 bool recurse,
struct ui_file *stream)
1839 for (c = list; c; c = c->
next)
1895 int ignore_help_classes,
int *nfound)
1901 for (c = clist; c; c = c->
next)
1902 if (!strncmp (command, c->
name, len)
1907 if (c->
name[len] ==
'\0')
1921 const char *p = text;
1934 if (*p ==
'!' || *p ==
'|')
1939 || *p ==
'+' || *p ==
'<' || *p ==
'>' || *p ==
'$')
1953 return isalnum (c) || c ==
'-' || c ==
'_' || c ==
'.';
1966 for (p =
name; *p !=
'\0'; ++p)
1982 int ignore_help_classes,
bool lookup_for_completion_p)
1987 bool found_alias =
false;
1988 const char *line = *text;
1990 while (**text ==
' ' || **text ==
'\t')
2004 command = (
char *) alloca (len + 1);
2005 memcpy (command, *text, len);
2006 command[len] =
'\0';
2011 found =
find_cmd (command, len, clist, ignore_help_classes, &nfound);
2019 if (result_list !=
nullptr)
2057 ignore_help_classes, lookup_for_completion_p);
2061 if (result_list !=
nullptr)
2062 *result_list = clist;
2072 if (result_list !=
nullptr)
2078 *result_list = found;
2092 if (result_list !=
nullptr)
2093 *result_list = clist;
2105 error (_(
"Undefined %scommand: \"%s\". Try \"help%s%.*s\"."),
2108 *cmdtype ?
" " :
"",
2109 (int) strlen (cmdtype) - 1,
2134 const char *cmdtype,
2145 error (_(
"Lack of needed %scommand"), cmdtype);
2156 q = (
char *) alloca (len + 1);
2157 strncpy (q, *line, len);
2168 int local_allow_unknown = (last_list ? last_list->
allow_unknown :
2170 std::string local_cmdtype
2171 = last_list ? last_list->
prefixname () : cmdtype;
2175 if (local_allow_unknown < 0)
2189 ((*line)[amb_len] && (*line)[amb_len] !=
' '
2190 && (*line)[amb_len] !=
'\t');
2195 for (c = local_list; c; c = c->
next)
2196 if (!strncmp (*line, c->
name, amb_len))
2198 if (strlen (ambbuf) + strlen (c->
name) + 6
2199 < (int)
sizeof ambbuf)
2201 if (strlen (ambbuf))
2202 strcat (ambbuf,
", ");
2203 strcat (ambbuf, c->
name);
2207 strcat (ambbuf,
"..");
2211 error (_(
"Ambiguous %scommand \"%s\": %s."),
2212 local_cmdtype.c_str (), *line, ambbuf);
2217 if (c->
type ==
set_cmd && **line !=
'\0' && !isspace (**line))
2218 error (_(
"Argument must be preceded by space."));
2222 while (**line ==
' ' || **line ==
'\t')
2239 bool ignore_help_classes)
2241 const char *tem =
name;
2243 ignore_help_classes);
2244 if (cmd !=
nullptr && strcmp (
name, cmd->
name) != 0)
2292 if (!((
alias !=
nullptr ?
alias->deprecated_warn_user : 0)
2297 std::string tmp_cmd_str;
2298 if (cmd->
prefix !=
nullptr)
2300 tmp_cmd_str += std::string (cmd->
name);
2304 if (
alias !=
nullptr)
2307 std::string tmp_alias_str;
2308 if (
alias->prefix !=
nullptr)
2309 tmp_alias_str +=
alias->prefix->prefixname ();
2310 tmp_alias_str += std::string (
alias->name);
2313 gdb_printf (_(
"Warning: command '%ps' (%ps) is deprecated.\n"),
2315 tmp_cmd_str.c_str ()),
2317 tmp_alias_str.c_str ()));
2319 gdb_printf (_(
"Warning: '%ps', an alias for the command '%ps', "
2320 "is deprecated.\n"),
2322 tmp_alias_str.c_str ()),
2324 tmp_cmd_str.c_str ()));
2327 gdb_printf (_(
"Warning: command '%ps' is deprecated.\n"),
2329 tmp_cmd_str.c_str ()));
2347 if (
alias !=
nullptr)
2348 alias->deprecated_warn_user = 0;
2375 *prefix_cmd = cur_list->
prefix;
2378 text = skip_spaces (text);
2393 std::string command (text, len);
2397 *cmd =
find_cmd (command.c_str (), len, cur_list, 1, &nfound);
2404 if ((*cmd)->is_alias ())
2414 text = skip_spaces (text);
2416 if ((*cmd)->is_prefix () && *text !=
'\0')
2463 const char *text,
const char *word,
2464 int ignore_help_classes)
2467 int textlen = strlen (text);
2469 int saw_deprecated_match = 0;
2475 for (pass = 0; pass < 2; ++pass)
2477 bool got_matches =
false;
2479 for (ptr = list; ptr; ptr = ptr->
next)
2480 if (!strncmp (ptr->
name, text, textlen)
2489 saw_deprecated_match = 1;
2504 if (!saw_deprecated_match)
2520 const char *
const *enumlist,
2521 const char *text,
const char *word)
2523 int textlen = strlen (text);
2527 for (i = 0; (
name = enumlist[i]) != NULL; i++)
2528 if (strncmp (
name, text, textlen) == 0)
2538 gdb::optional<scoped_restore_tmpl<bool>> restore_suppress;
2543 cmd->
func (args, from_tty, cmd);
2546 error (_(
"Invalid command"));
ui_file_style style() const
void add_completion(gdb::unique_xmalloc_ptr< char > name, completion_match_for_lcd *match_for_lcd=NULL, const char *text=NULL, const char *word=NULL)
virtual void wrap_here(int indent)
struct cmd_list_element * infolist
struct cmd_list_element * cmdlist
struct cmd_list_element * add_cmd_suppress_notification(const char *name, enum command_class theclass, cmd_simple_func_ftype *fun, const char *doc, struct cmd_list_element **list, bool *suppress_notification)
static void empty_func(const char *args, int from_tty, cmd_list_element *c)
set_show_commands add_setshow_filename_cmd(const char *name, enum command_class 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, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
static void fput_aliases_definition_styled(const cmd_list_element &cmd, struct ui_file *stream)
static int lookup_cmd_composition_1(const char *text, struct cmd_list_element **alias, struct cmd_list_element **prefix_cmd, struct cmd_list_element **cmd, struct cmd_list_element *cur_list)
set_show_commands add_setshow_uinteger_cmd(const char *name, enum command_class 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, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
static void help_all(struct ui_file *stream)
struct cmd_list_element * add_alias_cmd(const char *name, cmd_list_element *target, enum command_class theclass, int abbrev_flag, struct cmd_list_element **list)
struct cmd_list_element * lookup_cmd(const char **line, struct cmd_list_element *list, const char *cmdtype, std::string *default_args, int allow_unknown, int ignore_help_classes)
set_show_commands add_setshow_zinteger_cmd(const char *name, enum command_class 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, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
struct cmd_list_element * add_cmd(const char *name, enum command_class theclass, const char *doc, struct cmd_list_element **list)
void set_cmd_completer_handle_brkchars(struct cmd_list_element *cmd, completer_handle_brkchars_ftype *func)
void help_cmd(const char *command, struct ui_file *stream)
void complete_on_cmdlist(struct cmd_list_element *list, completion_tracker &tracker, const char *text, const char *word, int ignore_help_classes)
struct cmd_list_element * add_com_suppress_notification(const char *name, enum command_class theclass, cmd_simple_func_ftype *fun, const char *doc, bool *suppress_notification)
struct cmd_list_element * add_abbrev_prefix_cmd(const char *name, enum command_class theclass, cmd_simple_func_ftype *fun, const char *doc, struct cmd_list_element **subcommands, int allow_unknown, struct cmd_list_element **list)
void deprecated_cmd_warning(const char *text, struct cmd_list_element *list)
bool valid_cmd_char_p(int c)
static void help_cmd_list(struct cmd_list_element *list, enum command_class theclass, bool recurse, struct ui_file *stream)
static struct cmd_list_element * add_set_or_show_cmd(const char *name, enum cmd_types type, enum command_class theclass, var_types var_type, const setting::erased_args &arg, const char *doc, struct cmd_list_element **list)
static void print_help_for_command(const cmd_list_element &c, bool recurse, struct ui_file *stream)
cmd_list_element * add_com_alias(const char *name, cmd_list_element *target, command_class theclass, int abbrev_flag)
set_show_commands add_setshow_optional_filename_cmd(const char *name, enum command_class 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, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
struct cmd_list_element * lookup_cmd_1(const char **text, struct cmd_list_element *clist, struct cmd_list_element **result_list, std::string *default_args, int ignore_help_classes, bool lookup_for_completion_p)
static void set_cmd_simple_func(struct cmd_list_element *cmd, cmd_simple_func_ftype *simple_func)
static void update_prefix_field_of_prefixed_commands(struct cmd_list_element *c)
set_show_commands add_setshow_string_cmd(const char *name, enum command_class 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, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
void help_list(struct cmd_list_element *list, const char *cmdtype, enum command_class theclass, struct ui_file *stream)
void set_cmd_completer(struct cmd_list_element *cmd, completer_ftype *completer)
static set_show_commands add_setshow_cmd_full(const char *name, enum command_class theclass, var_types var_type, T *var, const char *set_doc, const char *show_doc, const char *help_doc, typename setting_func_types< T >::set set_setting_func, typename setting_func_types< T >::get get_setting_func, cmd_func_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
static void print_doc_of_command(const cmd_list_element &c, const char *prefix, bool verbose, compiled_regex &highlight, struct ui_file *stream)
static void fput_alias_definition_styled(const cmd_list_element &c, struct ui_file *stream)
struct cmd_list_element * add_show_prefix_cmd(const char *name, enum command_class theclass, const char *doc, struct cmd_list_element **subcommands, int allow_unknown, struct cmd_list_element **list)
struct cmd_list_element * add_com(const char *name, enum command_class theclass, cmd_simple_func_ftype *fun, const char *doc)
set_show_commands add_setshow_zuinteger_unlimited_cmd(const char *name, enum command_class 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, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
static bool user_documented_alias(const cmd_list_element &alias)
void apropos_cmd(struct ui_file *stream, struct cmd_list_element *commandlist, bool verbose, compiled_regex ®ex, const char *prefix)
static void do_prefix_cmd(const char *args, int from_tty, struct cmd_list_element *c)
set_show_commands add_setshow_integer_cmd(const char *name, enum command_class 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, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
void cmd_func(struct cmd_list_element *cmd, const char *args, int from_tty)
set_show_commands add_setshow_enum_cmd(const char *name, enum command_class 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, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
void not_just_help_class_command(const char *args, int from_tty)
static void integer_unlimited_completer(struct cmd_list_element *ignore, completion_tracker &tracker, const char *text, const char *word)
static void do_simple_func(const char *args, int from_tty, cmd_list_element *c)
struct cmd_list_element * deprecate_cmd(struct cmd_list_element *cmd, const char *replacement)
struct cmd_list_element * add_prefix_cmd_suppress_notification(const char *name, enum command_class theclass, cmd_simple_func_ftype *fun, const char *doc, struct cmd_list_element **subcommands, int allow_unknown, struct cmd_list_element **list, bool *suppress_notification)
set_show_commands add_setshow_prefix_cmd(const char *name, command_class theclass, const char *set_doc, const char *show_doc, cmd_list_element **set_subcommands_list, cmd_list_element **show_subcommands_list, cmd_list_element **set_list, cmd_list_element **show_list)
struct cmd_list_element * add_prefix_cmd(const char *name, enum command_class theclass, cmd_simple_func_ftype *fun, const char *doc, struct cmd_list_element **subcommands, int allow_unknown, struct cmd_list_element **list)
static cmd_list_element::aliases_list_type delete_cmd(const char *name, cmd_list_element **list, cmd_list_element **prehook, cmd_list_element **prehookee, cmd_list_element **posthook, cmd_list_element **posthookee)
bool valid_user_defined_cmd_name_p(const char *name)
static void fput_command_name_styled(const cmd_list_element &c, struct ui_file *stream)
set_show_commands add_setshow_boolean_cmd(const char *name, enum command_class 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, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
int find_command_name_length(const char *text)
cmd_list_element * add_info_alias(const char *name, cmd_list_element *target, int abbrev_flag)
int cmd_simple_func_eq(struct cmd_list_element *cmd, cmd_simple_func_ftype *simple_func)
const char *const boolean_enums[]
static struct cmd_list_element * lookup_cmd_with_subcommands(cmd_list_element **subcommands, cmd_list_element *list)
static void fput_command_names_styled(const cmd_list_element &c, bool always_fput_c_name, const char *postfix, struct ui_file *stream)
set_show_commands add_setshow_string_noescape_cmd(const char *name, enum command_class 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, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
static struct cmd_list_element * find_cmd(const char *command, int len, struct cmd_list_element *clist, int ignore_help_classes, int *nfound)
set_show_commands add_setshow_auto_boolean_cmd(const char *name, enum command_class theclass, enum 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, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
int lookup_cmd_composition(const char *text, struct cmd_list_element **alias, struct cmd_list_element **prefix_cmd, struct cmd_list_element **cmd)
static void do_show_prefix_cmd(const char *args, int from_tty, struct cmd_list_element *c)
struct cmd_list_element * lookup_cmd_exact(const char *name, struct cmd_list_element *list, bool ignore_help_classes)
void complete_on_enum(completion_tracker &tracker, const char *const *enumlist, const char *text, const char *word)
struct cmd_list_element * add_basic_prefix_cmd(const char *name, enum command_class theclass, const char *doc, struct cmd_list_element **subcommands, int allow_unknown, struct cmd_list_element **list)
int cli_user_command_p(struct cmd_list_element *cmd)
const char *const auto_boolean_enums[]
struct cmd_list_element * add_info(const char *name, cmd_simple_func_ftype *fun, const char *doc)
static void undef_cmd_error(const char *, const char *)
static struct cmd_list_element * do_add_cmd(const char *name, enum command_class theclass, const char *doc, struct cmd_list_element **list)
void print_doc_line(struct ui_file *stream, const char *str, bool for_value_prefix)
static set_show_commands add_setshow_cmd_full_erased(const char *name, enum command_class theclass, var_types var_type, const setting::erased_args &args, const char *set_doc, const char *show_doc, const char *help_doc, cmd_func_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
set_show_commands add_setshow_zuinteger_cmd(const char *name, enum command_class 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, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
void cmd_show_list(struct cmd_list_element *list, int from_tty)
cli_style_option title_style
#define CMD_LIST_AMBIGUOUS
void completer_ftype(struct cmd_list_element *, completion_tracker &tracker, const char *text, const char *word)
void cmd_simple_func_ftype(const char *args, int from_tty)
void() show_value_ftype(struct ui_file *file, int from_tty, struct cmd_list_element *cmd, const char *value)
@ var_zuinteger_unlimited
void completer_handle_brkchars_ftype(struct cmd_list_element *, completion_tracker &tracker, const char *text, const char *word)
void cmd_func_ftype(const char *args, int from_tty, cmd_list_element *c)
gdb::unique_xmalloc_ptr< char > make_completion_match_str(const char *match_name, const char *text, const char *word)
void filename_completer(struct cmd_list_element *ignore, completion_tracker &tracker, const char *text, const char *word)
#define prefix(a, b, R, do)
void(* func)(remote_target *remote, char *)
unsigned int doc_allocated
struct cmd_list_element * hook_post
aliases_list_type aliases
struct cmd_list_element * hookee_post
std::vector< std::string > command_components() const
bool * suppress_notification
cmd_simple_func_ftype * simple_func
gdb::optional< setting > var
struct cmd_list_element * hookee_pre
struct cmd_list_element * hook_pre
std::string prefixname() const
struct cmd_list_element ** subcommands
completer_handle_brkchars_ftype * completer_handle_brkchars
unsigned int cmd_deprecated
completer_ftype * completer
struct cmd_list_element * prefix
unsigned int deprecated_warn_user
bool is_command_class_help() const
intrusive_list< cmd_list_element, aliases_list_member_node_type > aliases_list_type
__extension__ enum cmd_types type
void(* destroyer)(struct cmd_list_element *self, void *context)
struct cmd_list_element * next
struct cmd_list_element * alias_target
const char *const * enums
show_value_ftype * show_value_func
unsigned int allow_unknown
enum command_class theclass
union cmd_list_element::@25 function
typename setting_func_types_1< std::is_scalar< T >::value, T >::get get
typename setting_func_types_1< std::is_scalar< T >::value, T >::set set
static erased_args erase_args(var_types var_type, T *var, typename setting_func_types< T >::set set_setting_func, typename setting_func_types< T >::get get_setting_func)
static styled_string_s * styled_string(const ui_file_style &style, const char *str, styled_string_s &&tmp={})
void fputs_highlighted(const char *str, const compiled_regex &highlight, struct ui_file *stream)
void fprintf_styled(struct ui_file *stream, const ui_file_style &style, const char *format,...)
void gdb_printf(struct ui_file *stream, const char *format,...)
void gdb_puts(const char *linebuffer, struct ui_file *stream)