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 (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,
544 const char *set_doc,
const char *show_doc,
545 const char *help_doc,
553 gdb::unique_xmalloc_ptr<char> full_set_doc;
554 gdb::unique_xmalloc_ptr<char> full_show_doc;
556 if (help_doc != NULL)
558 full_set_doc = xstrprintf (
"%s\n%s", set_doc, help_doc);
559 full_show_doc = xstrprintf (
"%s\n%s", show_doc, help_doc);
563 full_set_doc = make_unique_xstrdup (set_doc);
564 full_show_doc = make_unique_xstrdup (show_doc);
568 full_set_doc.release (), set_list);
571 if (set_func != NULL)
572 set->
func = set_func;
576 full_show_doc.release (), show_list);
591 const char *text,
const char *word)
607 if (startswith (l->literal, text))
631 const char *set_doc,
const char *show_doc,
632 const char *help_doc,
642 set_setting_func, get_setting_func);
667 const char *set_doc,
const char *show_doc,
668 const char *help_doc,
677 set_doc, show_doc, help_doc,
678 set_setting_func, get_setting_func,
679 set_func, show_func, set_list, show_list);
690 const char *
const *enumlist,
693 const char *show_doc,
694 const char *help_doc,
702 gdb_assert (
var !=
nullptr && *
var !=
nullptr);
703 for (
int i = 0; ; ++i)
705 gdb_assert (enumlist[i] !=
nullptr);
706 if (*
var == enumlist[i])
712 set_doc, show_doc, help_doc,
713 nullptr,
nullptr, set_func,
714 show_func, set_list, show_list);
724 const char *
const *enumlist,
const char *set_doc,
725 const char *show_doc,
const char *help_doc,
733 nullptr, set_doc, show_doc,
734 help_doc, set_func, get_func,
735 nullptr, show_func, set_list,
738 cmds.set->enums = enumlist;
755 const char *set_doc,
const char *show_doc,
756 const char *help_doc,
764 var, set_doc, show_doc, help_doc,
765 nullptr,
nullptr, set_func,
766 show_func, set_list, show_list);
778 const char *set_doc,
const char *show_doc,
779 const char *help_doc,
786 auto cmds = add_setshow_cmd_full<enum auto_boolean> (
name,
theclass,
792 set_list, show_list);
810 const char *set_doc,
const char *show_doc,
811 const char *help_doc,
819 set_doc, show_doc, help_doc,
820 nullptr,
nullptr, set_func, show_func,
821 set_list, show_list);
833 const char *set_doc,
const char *show_doc,
834 const char *help_doc,
842 set_doc, show_doc, help_doc,
843 set_func, get_func,
nullptr,
844 show_func, set_list, show_list);
857 const char *set_doc,
const char *show_doc,
858 const char *help_doc,
866 set_doc, show_doc, help_doc,
867 nullptr,
nullptr, set_func,
868 show_func, set_list, show_list);
880 const char *set_doc,
const char *show_doc,
881 const char *help_doc,
889 nullptr, set_doc, show_doc,
890 help_doc, set_func, get_func,
891 nullptr, show_func, set_list,
905 const char *set_doc,
const char *show_doc,
906 const char *help_doc,
914 set_doc, show_doc, help_doc,
915 nullptr,
nullptr, set_func,
916 show_func, set_list, show_list);
929 const char *set_doc,
const char *show_doc,
930 const char *help_doc,
938 nullptr, set_doc, show_doc,
939 help_doc, set_func, get_func,
940 nullptr, show_func, set_list,
955 const char *set_doc,
const char *show_doc,
956 const char *help_doc,
964 var, set_doc, show_doc, help_doc,
965 nullptr,
nullptr, set_func, show_func,
966 set_list, show_list);
979 const char *set_doc,
const char *show_doc,
980 const char *help_doc,
987 auto cmds = add_setshow_cmd_full<std::string> (
name,
theclass,
989 set_doc, show_doc, help_doc,
991 nullptr, show_func, set_list,
1006 const char *set_doc,
const char *show_doc,
1007 const char *help_doc,
1015 var, set_doc, show_doc, help_doc,
1016 nullptr,
nullptr, set_func, show_func,
1017 set_list, show_list);
1029 const char *set_doc,
const char *show_doc,
1030 const char *help_doc,
1039 nullptr, set_doc, show_doc, help_doc,
1040 set_func, get_func,
nullptr, show_func,
1041 set_list,show_list);
1057 const char *set_doc,
const char *show_doc,
1058 const char *help_doc,
1067 help_doc,
nullptr,
nullptr, set_func,
1068 show_func, set_list, show_list);
1078 const char *set_doc,
const char *show_doc,
1079 const char *help_doc,
1088 help_doc, set_func, get_func,
nullptr,
1089 show_func, set_list, show_list);
1096 {
"unlimited", INT_MAX, 0 },
1106 const char *set_doc,
const char *show_doc,
1107 const char *help_doc,
1116 set_doc, show_doc, help_doc,
1117 nullptr,
nullptr, set_func,
1118 show_func, set_list, show_list);
1127 const char *set_doc,
const char *show_doc,
1128 const char *help_doc,
1137 set_doc, show_doc, help_doc, set_func,
1138 get_func,
nullptr, show_func, set_list,
1151 const char *set_doc,
const char *show_doc,
1152 const char *help_doc,
1161 help_doc,
nullptr,
nullptr, set_func,
1162 show_func, set_list, show_list);
1172 const char *set_doc,
const char *show_doc,
1173 const char *help_doc,
1182 help_doc, set_func, get_func,
nullptr,
1183 show_func, set_list, show_list);
1195 const char *set_doc,
const char *show_doc,
1196 const char *help_doc,
1205 help_doc,
nullptr,
nullptr, set_func,
1206 show_func, set_list, show_list);
1216 const char *set_doc,
const char *show_doc,
1217 const char *help_doc,
1226 set_doc, show_doc, help_doc,
1227 set_func, get_func,
nullptr,
1228 show_func, set_list,
1236 {
"unlimited", UINT_MAX, 0 },
1246 const char *set_doc,
const char *show_doc,
1247 const char *help_doc,
1256 set_doc, show_doc, help_doc,
nullptr,
1257 nullptr, set_func, show_func,
1258 set_list, show_list);
1267 const char *set_doc,
const char *show_doc,
1268 const char *help_doc,
1278 set_doc, show_doc, help_doc,
1279 set_func, get_func,
nullptr,
1280 show_func, set_list,
1293 const char *set_doc,
const char *show_doc,
1294 const char *help_doc,
1301 set_doc, show_doc, help_doc,
1302 nullptr,
nullptr, set_func,
1303 show_func, set_list, show_list);
1311 const char *set_doc,
const char *show_doc,
1312 const char *help_doc,
1320 set_doc, show_doc, help_doc, set_func,
1321 get_func,
nullptr, show_func, set_list,
1328 {
"unlimited", -1, -1 },
1339 const char *set_doc,
1340 const char *show_doc,
1341 const char *help_doc,
1350 set_doc, show_doc, help_doc,
nullptr,
1351 nullptr, set_func, show_func, set_list,
1361 const char *set_doc,
const char *show_doc,
1362 const char *help_doc,
1372 set_doc, show_doc, help_doc, set_func,
1373 get_func,
nullptr, show_func, set_list,
1386 const char *set_doc,
const char *show_doc,
1387 const char *help_doc,
1394 var, set_doc, show_doc, help_doc,
1395 nullptr,
nullptr, set_func,
1396 show_func, set_list, show_list);
1404 const char *set_doc,
const char *show_doc,
1405 const char *help_doc,
1413 nullptr, set_doc, show_doc,
1414 help_doc, set_func, get_func,
1415 nullptr, show_func, set_list,
1440 previous_chain_ptr = list;
1442 for (iter = *previous_chain_ptr; iter; iter = *previous_chain_ptr)
1444 if (strcmp (iter->
name,
name) == 0)
1459 *previous_chain_ptr = iter->
next;
1477 previous_chain_ptr = &iter->
next;
1551 gdb_assert (
alias.is_alias ());
1554 return (
alias.doc_allocated
1555 && strcmp (
alias.doc,
alias.alias_target->doc) != 0);
1581 if (!
alias.cmd_deprecated
1583 && !
alias.default_args.empty ())
1595 bool always_fput_c_name,
const char *postfix,
1607 bool print_something = always_fput_c_name;
1608 if (!print_something)
1611 if (!print_alias (
alias))
1614 print_something =
true;
1618 if (print_something)
1623 if (!print_alias (
alias))
1631 if (print_something)
1641 compiled_regex &highlight,
struct ui_file *stream)
1650 verbose ?
"" :
" -- ", stream);
1676 bool verbose, compiled_regex ®ex)
1682 for (c=commandlist;c;c=c->
next)
1693 if (c->
name != NULL)
1695 size_t name_len = strlen (c->
name);
1698 returnvalue = regex.search (c->
name, name_len, 0, name_len, NULL);
1699 if (returnvalue >= 0)
1705 name_len = strlen (
alias.name);
1706 returnvalue = regex.search (
alias.name, name_len, 0, name_len, NULL);
1707 if (returnvalue >= 0)
1714 if (c->
doc != NULL && returnvalue < 0)
1716 size_t doc_len = strlen (c->
doc);
1719 if (regex.search (c->
doc, doc_len, 0, doc_len, NULL) >= 0)
1754 if (strcmp (command,
"all") == 0)
1760 const char *orig_command = command;
1816 "\nThis command has a hook (or hooks) defined:\n");
1820 "\tThis command is run after : %s (pre hook)\n",
1824 "\tThis command is run before : %s (post hook)\n",
1845 char *cmdtype1, *cmdtype2;
1849 len = strlen (cmdtype);
1850 cmdtype1 = (
char *) alloca (len + 1);
1852 cmdtype2 = (
char *) alloca (len + 4);
1857 memcpy (cmdtype1 + 1, cmdtype, len - 1);
1859 memcpy (cmdtype2, cmdtype, len - 1);
1860 strcpy (cmdtype2 + len - 1,
" sub");
1864 gdb_printf (stream,
"List of classes of %scommands:\n\n", cmdtype2);
1866 gdb_printf (stream,
"List of %scommands:\n\n", cmdtype2);
1873Type \"help%s\" followed by a class name for a list of commands in ",
1879Type \"help all\" for the list of all commands.");
1882 gdb_printf (stream,
"\nType \"help%s\" followed by %scommand name ",
1883 cmdtype1, cmdtype2);
1889 gdb_puts (
"documentation.\n", stream);
1890 gdb_puts (
"Type \"apropos word\" to search "
1891 "for commands related to \"word\".\n", stream);
1892 gdb_puts (
"Type \"apropos -v word\" for full documentation", stream);
1894 gdb_puts (
" of commands related to \"word\".\n", stream);
1895 gdb_puts (
"Command name abbreviations are allowed if unambiguous.\n",
1903 int seen_unclassified = 0;
1930 if (!seen_unclassified)
1932 gdb_printf (stream,
"\nUnclassified commands\n\n");
1933 seen_unclassified = 1;
1945 bool for_value_prefix)
1947 static char *line_buffer = 0;
1948 static int line_size;
1954 line_buffer = (
char *)
xmalloc (line_size);
1959 while (*p && *p !=
'\n')
1961 if (p - str > line_size - 1)
1963 line_size = p - str + 1;
1964 xfree (line_buffer);
1965 line_buffer = (
char *)
xmalloc (line_size);
1967 strncpy (line_buffer, str, p - str);
1968 if (for_value_prefix)
1970 if (islower (line_buffer[0]))
1971 line_buffer[0] = toupper (line_buffer[0]);
1972 gdb_assert (p > str);
1973 if (line_buffer[p - str - 1] ==
'.')
1974 line_buffer[p - str - 1] =
'\0';
1976 line_buffer[p - str] =
'\0';
1979 line_buffer[p - str] =
'\0';
1988 bool recurse,
struct ui_file *stream)
2027 bool recurse,
struct ui_file *stream)
2031 for (c = list; c; c = c->
next)
2087 int ignore_help_classes,
int *nfound)
2093 for (c = clist; c; c = c->
next)
2094 if (!strncmp (command, c->
name, len)
2099 if (c->
name[len] ==
'\0')
2113 const char *p = text;
2126 if (*p ==
'!' || *p ==
'|')
2131 || *p ==
'+' || *p ==
'<' || *p ==
'>' || *p ==
'$')
2145 return isalnum (c) || c ==
'-' || c ==
'_' || c ==
'.';
2158 for (p =
name; *p !=
'\0'; ++p)
2174 int ignore_help_classes,
bool lookup_for_completion_p)
2179 bool found_alias =
false;
2180 const char *line = *text;
2182 while (**text ==
' ' || **text ==
'\t')
2196 command = (
char *) alloca (len + 1);
2197 memcpy (command, *text, len);
2198 command[len] =
'\0';
2203 found =
find_cmd (command, len, clist, ignore_help_classes, &nfound);
2211 if (result_list !=
nullptr)
2249 ignore_help_classes, lookup_for_completion_p);
2253 if (result_list !=
nullptr)
2254 *result_list = clist;
2264 if (result_list !=
nullptr)
2270 *result_list = found;
2284 if (result_list !=
nullptr)
2285 *result_list = clist;
2297 error (_(
"Undefined %scommand: \"%s\". Try \"help%s%.*s\"."),
2300 *cmdtype ?
" " :
"",
2301 (int) strlen (cmdtype) - 1,
2326 const char *cmdtype,
2337 error (_(
"Lack of needed %scommand"), cmdtype);
2348 q = (
char *) alloca (len + 1);
2349 strncpy (q, *line, len);
2360 int local_allow_unknown = (last_list ? last_list->
allow_unknown :
2362 std::string local_cmdtype
2363 = last_list ? last_list->
prefixname () : cmdtype;
2367 if (local_allow_unknown < 0)
2381 ((*line)[amb_len] && (*line)[amb_len] !=
' '
2382 && (*line)[amb_len] !=
'\t');
2387 for (c = local_list; c; c = c->
next)
2388 if (!strncmp (*line, c->
name, amb_len))
2390 if (strlen (ambbuf) + strlen (c->
name) + 6
2391 < (int)
sizeof ambbuf)
2393 if (strlen (ambbuf))
2394 strcat (ambbuf,
", ");
2395 strcat (ambbuf, c->
name);
2399 strcat (ambbuf,
"..");
2403 error (_(
"Ambiguous %scommand \"%s\": %s."),
2404 local_cmdtype.c_str (), *line, ambbuf);
2409 if (c->
type ==
set_cmd && **line !=
'\0' && !isspace (**line))
2410 error (_(
"Argument must be preceded by space."));
2414 while (**line ==
' ' || **line ==
'\t')
2431 bool ignore_help_classes)
2433 const char *tem =
name;
2435 ignore_help_classes);
2436 if (cmd !=
nullptr && strcmp (
name, cmd->
name) != 0)
2484 if (!((
alias !=
nullptr ?
alias->deprecated_warn_user : 0)
2489 std::string tmp_cmd_str;
2490 if (cmd->
prefix !=
nullptr)
2492 tmp_cmd_str += std::string (cmd->
name);
2496 if (
alias !=
nullptr)
2499 std::string tmp_alias_str;
2500 if (
alias->prefix !=
nullptr)
2501 tmp_alias_str +=
alias->prefix->prefixname ();
2502 tmp_alias_str += std::string (
alias->name);
2505 gdb_printf (_(
"Warning: command '%ps' (%ps) is deprecated.\n"),
2507 tmp_cmd_str.c_str ()),
2509 tmp_alias_str.c_str ()));
2511 gdb_printf (_(
"Warning: '%ps', an alias for the command '%ps', "
2512 "is deprecated.\n"),
2514 tmp_alias_str.c_str ()),
2516 tmp_cmd_str.c_str ()));
2519 gdb_printf (_(
"Warning: command '%ps' is deprecated.\n"),
2521 tmp_cmd_str.c_str ()));
2539 if (
alias !=
nullptr)
2540 alias->deprecated_warn_user = 0;
2567 *prefix_cmd = cur_list->
prefix;
2570 text = skip_spaces (text);
2585 std::string command (text, len);
2589 *cmd =
find_cmd (command.c_str (), len, cur_list, 1, &nfound);
2596 if ((*cmd)->is_alias ())
2606 text = skip_spaces (text);
2608 if ((*cmd)->is_prefix () && *text !=
'\0')
2655 const char *text,
const char *word,
2656 int ignore_help_classes)
2659 int textlen = strlen (text);
2661 int saw_deprecated_match = 0;
2667 for (pass = 0; pass < 2; ++pass)
2669 bool got_matches =
false;
2671 for (ptr = list; ptr; ptr = ptr->
next)
2672 if (!strncmp (ptr->
name, text, textlen)
2681 saw_deprecated_match = 1;
2696 if (!saw_deprecated_match)
2712 const char *
const *enumlist,
2713 const char *text,
const char *word)
2715 int textlen = strlen (text);
2719 for (i = 0; (
name = enumlist[i]) != NULL; i++)
2720 if (strncmp (
name, text, textlen) == 0)
2730 gdb::optional<scoped_restore_tmpl<bool>> restore_suppress;
2735 cmd->
func (args, from_tty, cmd);
2738 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)
const literal_def pinteger_unlimited_literals[]
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)
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)
static set_show_commands add_setshow_cmd_full_erased(const char *name, enum command_class theclass, var_types var_type, const literal_def *extra_literals, 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_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)
static void print_doc_of_command(const cmd_list_element &c, bool verbose, compiled_regex &highlight, struct ui_file *stream)
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 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)
const literal_def integer_unlimited_literals[]
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)
static set_show_commands add_setshow_cmd_full(const char *name, enum command_class theclass, var_types var_type, T *var, const literal_def *extra_literals, 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)
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 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)
void apropos_cmd(struct ui_file *stream, struct cmd_list_element *commandlist, bool verbose, compiled_regex ®ex)
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)
static void do_prefix_cmd(const char *args, int from_tty, struct cmd_list_element *c)
void cmd_func(struct cmd_list_element *cmd, const char *args, int from_tty)
set_show_commands add_setshow_uinteger_cmd(const char *name, enum command_class 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, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
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)
set_show_commands add_setshow_integer_cmd(const char *name, enum command_class 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, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
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)
const literal_def uinteger_unlimited_literals[]
int cmd_simple_func_eq(struct cmd_list_element *cmd, cmd_simple_func_ftype *simple_func)
set_show_commands add_setshow_pinteger_cmd(const char *name, enum command_class 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, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
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)
static void integer_literals_completer(struct cmd_list_element *c, completion_tracker &tracker, const char *text, const char *word)
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)
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 literal_def *extra_literals, const setting::erased_args &arg, const char *doc, struct cmd_list_element **list)
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)
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)
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)
void(* func)(remote_target *remote, char *)
const literal_def * extra_literals
unsigned int doc_allocated
struct cmd_list_element * hook_post
union cmd_list_element::@27 function
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
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)