22 #include "dyn-string.h"
23 #include "readline/readline.h"
24 #include "readline/tilde.h"
35 #include "filenames.h"
207 error (
_(
"Argument required (%s)."), why);
218 "the name of an info command.\n"));
246 char *
point, *arg_prefix;
258 " completion is disabled.\n"));
265 argpoint = strlen (arg);
271 point = arg + argpoint;
274 if (strchr (rl_completer_word_break_characters, point[-1]) != 0)
279 arg_prefix = alloca (point - arg + 1);
280 memcpy (arg_prefix, arg, point - arg);
281 arg_prefix[point - arg] = 0;
283 completions = complete_line (point, arg, argpoint);
288 char *item, *prev = NULL;
297 if (prev == NULL || strcmp (item, prev) != 0)
346 error (
_(
"Not confirmed."));
357 error (
_(
"The \"pwd\" command does not take an argument: %s"), args);
359 error (
_(
"Error finding name of working directory: %s"),
385 dir = tilde_expand (dir);
391 #ifdef HAVE_DOS_BASED_FILE_SYSTEM
399 if (IS_DIR_SEPARATOR (dir[len - 1]))
404 #ifdef HAVE_DOS_BASED_FILE_SYSTEM
405 && !(len == 3 && dir[1] ==
':')
412 if (IS_ABSOLUTE_PATH (dir))
429 if (IS_DIR_SEPARATOR (p[0]) && p[1] ==
'.'
430 && (p[2] == 0 || IS_DIR_SEPARATOR (p[2])))
431 memmove (p, p + 2, strlen (p + 2) + 1);
432 else if (IS_DIR_SEPARATOR (p[0]) && p[1] ==
'.' && p[2] ==
'.'
433 && (p[3] == 0 || IS_DIR_SEPARATOR (p[3])))
450 memmove (q - 1, p + 3, strlen (p + 3) + 1);
481 _(
"Script filename extension recognition is \"%s\".\n"),
497 FILE **streamp,
char **full_pathp)
504 file = tilde_expand (script_file);
513 file, O_RDONLY, full_pathp);
517 int save_errno = errno;
525 *streamp = fdopen (fd, FOPEN_RT);
526 if (*streamp == NULL)
528 int save_errno = errno;
558 sourcer (extlang, stream, file);
586 if (file == NULL || *file == 0)
587 error (
_(
"source command requires file name of file to source."));
638 int *old_source_verbose =
xmalloc (
sizeof(
int));
653 while (args[0] !=
'\0')
662 if (args[1] ==
'v' && isspace (args[2]))
669 else if (args[1] ==
's' && isspace (args[2]))
692 const char *p = text;
696 while ((c = *p++) !=
'\0')
721 #if defined(CANT_FORK) || \
722 (!defined(HAVE_WORKING_VFORK) && !defined(HAVE_WORKING_FORK))
725 int rc = system (arg ? arg :
"");
728 arg =
"inferior shell";
749 if ((pid = vfork ()) == 0)
751 const char *p, *user_shell;
755 if ((user_shell = (
char *) getenv (
"SHELL")) == NULL)
756 user_shell =
"/bin/sh";
759 p = lbasename (user_shell);
762 execl (user_shell, p, (
char *) 0);
764 execl (user_shell, p,
"-c", arg, (
char *) 0);
773 waitpid (pid, &status, 0);
802 error (
_(
"No default source file yet."));
829 error (
_(
"Junk at end of line specification."));
840 error (
_(
"No source file for address %s."),
862 error (
_(
"No line number known for %s."), arg);
865 if ((editor = (
char *) getenv (
"EDITOR")) == NULL)
893 if (arg == 0 || arg[0] ==
'+' || arg[0] ==
'-')
910 if (arg != NULL && arg[0] ==
'-'
922 if (arg == 0 || strcmp (arg,
"+") == 0)
931 if (strcmp (arg,
"-") == 0)
947 error (
_(
"No symbol table is loaded. Use the \"file\" command."));
972 for (p = arg; p != arg1 && *p >=
'0' && *p <=
'9'; p++);
973 linenum_beg = (p == arg1);
975 while (*arg1 ==
' ' || *arg1 ==
'\t')
981 while (*arg1 ==
' ' || *arg1 ==
'\t')
993 if (sals_end.
nelts == 0)
995 if (sals_end.
nelts > 1)
1001 sal_end = sals_end.
sals[0];
1007 error (
_(
"Junk at end of line specification."));
1009 if (!no_end && !dummy_beg && !dummy_end
1011 error (
_(
"Specified start and end are in different files."));
1012 if (dummy_beg && dummy_end)
1013 error (
_(
"Two empty args do not say what lines to list."));
1025 error (
_(
"No source file for address %s."),
1045 if (!linenum_beg && sal.
symtab == 0)
1046 error (
_(
"No line number known for %s."), arg);
1054 if (dummy_beg && sal_end.
symtab == 0)
1055 error (
_(
"No default source file yet. Do \"help list\"."));
1059 sal_end.
line + 1, 0);
1060 else if (sal.
symtab == 0)
1061 error (
_(
"No default source file yet. Do \"help list\"."));
1066 if (first_line < 1) first_line = 1;
1077 : sal_end.
line + 1),
1131 error (
_(
"No function contains program counter for selected frame."));
1177 error (
_(
"Missing modifier."));
1179 while (*p && ! isspace (*p))
1190 error (
_(
"Invalid disassembly modifier."));
1211 error (
_(
"No function contains specified address."));
1250 p =
xmalloc (
sizeof (
"make ") + strlen (arg));
1251 strcpy (p,
"make ");
1252 strcpy (p +
sizeof (
"make ") - 1, arg);
1266 const char *comname = args;
1268 c =
lookup_cmd (&comname, cmdlist,
"", 0, 1);
1270 error (
_(
"Not a user command."));
1275 for (c = cmdlist; c; c = c->
next)
1292 if (searchstr == NULL)
1293 error (
_(
"REGEXP string is empty"));
1295 code = regcomp (&pattern, searchstr, REG_ICASE);
1309 error (
_(
"Error in regular expression: %s"), err);
1324 dyn_string_t result = dyn_string_new (10);
1327 gdb_assert (n >= 0 && n <= countargv (argv));
1329 for (i = 0; i < n; ++i)
1332 dyn_string_append_char (result,
' ');
1333 dyn_string_append_cstr (result, argv[i]);
1355 while (*command ==
' ' || *command ==
'\t')
1357 return *command ==
'\0';
1365 int i, alias_argc, command_argc;
1367 char *args2, *equals, *alias, *command;
1368 char **alias_argv, **command_argv;
1369 dyn_string_t alias_dyn_string, command_dyn_string;
1371 static const char usage[] =
N_(
"Usage: alias [-a] [--] ALIAS = COMMAND");
1373 if (args == NULL || strchr (args,
'=') == NULL)
1376 args2 = xstrdup (args);
1378 equals = strchr (args2,
'=');
1385 for (i = 0; alias_argv[i] != NULL; )
1387 if (strcmp (alias_argv[i],
"-a") == 0)
1392 else if (strcmp (alias_argv[i],
"--") == 0)
1401 if (alias_argv[0] == NULL || command_argv[0] == NULL
1402 || *alias_argv[0] ==
'\0' || *command_argv[0] ==
'\0')
1405 for (i = 0; alias_argv[i] != NULL; ++i)
1410 error (
_(
"Invalid command name: %s"), alias_argv[i]);
1412 error (
_(
"Invalid command element name: %s"), alias_argv[i]);
1416 alias_argc = countargv (alias_argv);
1417 command_argc = countargv (command_argv);
1424 command = dyn_string_buf (command_dyn_string);
1426 error (
_(
"Invalid command to alias to: %s"), command);
1431 alias = dyn_string_buf (alias_dyn_string);
1433 error (
_(
"Alias already exists: %s"), alias);
1444 if (alias_argc == 1)
1452 dyn_string_t alias_prefix_dyn_string, command_prefix_dyn_string;
1453 const char *alias_prefix, *command_prefix;
1456 if (alias_argc != command_argc)
1457 error (
_(
"Mismatched command length between ALIAS and COMMAND."));
1461 alias_prefix_dyn_string =
1464 command_prefix_dyn_string =
1467 alias_prefix = dyn_string_buf (alias_prefix_dyn_string);
1468 command_prefix = dyn_string_buf (command_prefix_dyn_string);
1470 c_command =
lookup_cmd_1 (& command_prefix, cmdlist, NULL, 1);
1475 c_alias =
lookup_cmd_1 (& alias_prefix, cmdlist, NULL, 1);
1476 if (c_alias != c_command)
1477 error (
_(
"ALIAS and COMMAND prefixes do not match."));
1481 command_argv[command_argc - 1],
1498 for (i = 0; i < sals->
nelts; ++i)
1520 else if (dirb == NULL)
1527 r = filename_cmp (dira, dirb);
1538 return sala->
line == salb->
line ? 0 : 1;
1550 for (i = 0; i < sals->
nelts; ++i)
1566 for (i = 1; i < sals->
nelts; ++i)
1577 if (sals->
nelts == 0)
1590 "the name of a debug subcommand.\n"));
1613 _(
"Verbose printing of informational messages is %s.\n"),
1640 _(
"Timeout limit to wait for target to respond is %s.\n"),
1649 _(
"The max call depth for user-defined commands is %s.\n"),
1666 Maintenance commands.\n\
1667 Some gdb commands are provided just for use by gdb maintainers.\n\
1668 These commands are subject to frequent change, and may not be as\n\
1669 well documented as user commands."),
1673 _(
"Aliases of other commands."), &cmdlist);
1675 User-defined commands.\n\
1676 The commands in this class are those defined by the user.\n\
1677 Use the \"define\" command to define a command."), &cmdlist);
1684 _(
"Making program stop at certain points."), &cmdlist);
1687 Examining the stack.\n\
1688 The stack is made up of stack frames. Gdb assigns numbers to stack frames\n\
1689 counting from zero for the innermost (currently executing) frame.\n\n\
1690 At any time gdb identifies one frame as the \"selected\" frame.\n\
1691 Variable lookups are done with respect to the selected frame.\n\
1692 When the program being debugged stops, gdb selects the innermost frame.\n\
1693 The commands below can be used to select other frames by number or address."),
1700 Print working directory. This is used for your program as well."));
1703 Set working directory to DIR for debugger and program being debugged.\n\
1704 The change does not take effect for the program being debugged\n\
1705 until the next time it is started."), &cmdlist);
1709 Print a constant string. Give string as argument.\n\
1710 C escape sequences may be used in the argument.\n\
1711 No newline is added at the end of the argument;\n\
1712 use \"\\n\" if you want a newline to be printed.\n\
1713 Since leading and trailing whitespace are ignored in command arguments,\n\
1714 if you want to print some you must use \"\\\" before leading whitespace\n\
1715 to be printed or after trailing whitespace."));
1719 Set mode for script filename extension recognition."),
_(
"\
1720 Show mode for script filename extension recognition."),
_(
"\
1721 off == no filename extension recognition (all sourced files are GDB scripts)\n\
1722 soft == evaluate script according to filename extension, fallback to GDB script"
1724 strict == evaluate script according to filename extension, error if not supported"
1728 &setlist, &showlist);
1732 Usage: quit [EXPR]\n\
1733 The optional expression EXPR, if present, is evaluated and the result\n\
1734 used as GDB's exit code. The default is zero."));
1736 _(
"Print list of commands."));
1742 Set verbosity."),
_(
"\
1743 Show verbosity."), NULL,
1746 &setlist, &showlist);
1749 _(
"Generic command for setting command history parameters."),
1750 &sethistlist,
"set history ", 0, &setlist);
1752 _(
"Generic command for showing command history parameters."),
1753 &showhistlist,
"show history ", 0, &showlist);
1756 Set history expansion on command input."),
_(
"\
1757 Show history expansion on command input."),
_(
"\
1758 Without an argument, history expansion is enabled."),
1761 &sethistlist, &showhistlist);
1764 Generic command for showing things about the program being debugged."),
1765 &infolist,
"info ", 0, &cmdlist);
1770 _(
"List the completions for the rest of the line as a command."));
1773 Generic command for showing things about the debugger."),
1774 &showlist,
"show ", 0, &cmdlist);
1779 Show the history of commands you typed.\n\
1780 You can supply a command number to start with, or a `+' to start after\n\
1781 the previous command number shown."),
1785 _(
"Show what version of GDB this is."), &showlist);
1788 _(
"Show how GDB was configured at build time."), &showlist);
1791 Set debugging of remote protocol."),
_(
"\
1792 Show debugging of remote protocol."),
_(
"\
1793 When enabled, each packet sent or received with the remote target\n\
1797 &setdebuglist, &showdebuglist);
1801 Set timeout limit to wait for target to respond."),
_(
"\
1802 Show timeout limit to wait for target to respond."),
_(
"\
1803 This value is used to set the time limit for gdb to wait for a response\n\
1807 &setlist, &showlist);
1810 _(
"Generic command for setting gdb debugging flags"),
1811 &setdebuglist,
"set debug ", 0, &setlist);
1814 _(
"Generic command for showing gdb debugging flags"),
1815 &showdebuglist,
"show debug ", 0, &showlist);
1818 Execute the rest of the line as a shell command.\n\
1819 With no arguments, run an inferior shell."));
1823 Edit specified file or function.\n\
1824 With no argument, edits file containing most recent line listed.\n\
1825 Editing targets can be specified in these ways:\n\
1826 FILE:LINENUM, to edit at that line in that file,\n\
1827 FUNCTION, to edit at the beginning of that function,\n\
1828 FILE:FUNCTION, to distinguish among like-named static functions.\n\
1829 *ADDRESS, to edit at the line containing that address.\n\
1830 Uses EDITOR environment variable contents as editor (or ex as default)."));
1835 List specified function or line.\n\
1836 With no argument, lists ten more lines after or around previous listing.\n\
1837 \"list -\" lists the ten lines before a previous ten-line listing.\n\
1838 One argument specifies a line, and ten lines are listed around that line.\n\
1839 Two arguments with comma between specify starting and ending lines to list.\n\
1840 Lines can be specified in these ways:\n\
1841 LINENUM, to list around that line in current file,\n\
1842 FILE:LINENUM, to list around that line in that file,\n\
1843 FUNCTION, to list around beginning of that function,\n\
1844 FILE:FUNCTION, to distinguish among like-named static functions.\n\
1845 *ADDRESS, to list around the line containing that address.\n\
1846 With two args if one is empty it stands for ten lines away from \
1855 Disassemble a specified section of memory.\n\
1856 Default is the function surrounding the pc of the selected frame.\n\
1857 With a /m modifier, source lines are included (if available).\n\
1858 With a /r modifier, raw instructions in hex are included.\n\
1859 With a single argument, the function surrounding that address is dumped.\n\
1860 Two arguments (separated by a comma) are taken as a range of memory to dump,\n\
1861 in the form of \"start,end\", or \"start,+length\".\n\
1863 Note that the address is interpreted as an expression, not as a location\n\
1864 like in the \"break\" command.\n\
1865 So, for example, if you want to disassemble function bar in file foo.c\n\
1866 you must type \"disassemble 'foo.c'::bar\" and not \"disassemble foo.c:bar\"."));
1872 Run the ``make'' program using the rest of the line as arguments."));
1875 Show definitions of non-python/scheme user defined commands.\n\
1876 Argument is the name of the user defined command.\n\
1877 With no argument, show definitions of all user defined commands."), &showlist);
1879 _(
"Search for commands matching a REGEXP"));
1883 Set the max call depth for non-python/scheme user-defined commands."),
_(
"\
1884 Show the max call depth for non-python/scheme user-defined commands."), NULL,
1887 &setlist, &showlist);
1890 Set tracing of GDB CLI commands."),
_(
"\
1891 Show state of GDB CLI command tracing."),
_(
"\
1892 When 'on', each command is displayed as it is executed."),
1895 &setlist, &showlist);
1898 Define a new command that is an alias of an existing command.\n\
1899 Usage: alias [-a] [--] ALIAS = COMMAND\n\
1900 ALIAS is the name of the alias command to create.\n\
1901 COMMAND is the command being aliased to.\n\
1902 If \"-a\" is specified, the command is an abbreviation,\n\
1903 and will not appear in help command list output.\n\
1906 Make \"spe\" an alias of \"set print elements\":\n\
1907 alias spe = set print elements\n\
1908 Make \"elms\" an alias of \"elements\" in the \"set print\" command:\n\
1909 alias -a set print elms = set print elements"));
1916 char *source_help_text;
1919 Read commands from a file named FILE.\n\
1921 Usage: source [-s] [-v] FILE\n\
1922 -s: search for the script in the source search path,\n\
1923 even if FILE contains directories.\n\
1924 -v: each command in FILE is echoed as it is executed.\n\
1926 Note that the file \"%s\" is read automatically in this way\n\
1927 when GDB is started."),
gdbinit);
1929 source_help_text, &cmdlist);
void error_no_arg(const char *why)
struct cleanup * make_cleanup_freeargv(char **arg)
static void show_user(char *, int)
struct cmd_list_element * add_prefix_cmd(const char *name, enum command_class theclass, cmd_cfunc_ftype *fun, const char *doc, struct cmd_list_element **prefixlist, const char *prefixname, int allow_unknown, struct cmd_list_element **list)
const char * symtab_to_filename_for_display(struct symtab *symtab)
struct cmd_list_element * setchecklist
struct cmd_list_element * next
#define SYMTAB_DIRNAME(symtab)
static const char script_ext_off[]
CORE_ADDR get_frame_address_in_block(struct frame_info *this_frame)
static void apropos_command(char *searchstr, int from_tty)
#define DISASSEMBLY_SOURCE
struct frame_info * get_selected_frame(const char *message)
#define SYMBOL_PRINT_NAME(symbol)
void 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_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
#define DISASSEMBLY_OMIT_FNAME
void apropos_cmd(struct ui_file *stream, struct cmd_list_element *commandlist, struct re_pattern_buffer *regex, const char *prefix)
static void echo_command(char *, int)
struct cmd_list_element * showchecklist
struct cmd_list_element * enablelist
void 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_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
void set_default_source_symtab_and_line(void)
static void show_script_ext_mode(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static void shell_escape(char *, int)
static void show_debug(char *, int)
struct cmd_list_element * maintenanceinfolist
struct symtab_and_line get_current_source_symtab_and_line(void)
static void show_remote_debug(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
struct ui_file * gdb_stdout
static void print_disassembly(struct gdbarch *gdbarch, const char *name, CORE_ADDR low, CORE_ADDR high, int flags)
void show_history(char *args, int from_tty)
CORE_ADDR gdbarch_deprecated_function_start_offset(struct gdbarch *gdbarch)
static int compare_symtabs(const void *a, const void *b)
int ui_out_is_mi_like_p(struct ui_out *uiout)
struct cmd_list_element * deletelist
char * get_regcomp_error(int, regex_t *)
void quit_force(char *args, int from_tty)
struct cmd_list_element * lookup_cmd_1(const char **text, struct cmd_list_element *clist, struct cmd_list_element **result_list, int ignore_help_classes)
static void show_version(char *, int)
int have_partial_symbols(void)
struct cmd_list_element * cmdlist
const struct extension_language_defn * get_ext_lang_of_file(const char *file)
void print_gdb_configuration(struct ui_file *stream)
char * skip_spaces(char *chp)
void set_verbose(char *args, int from_tty, struct cmd_list_element *c)
#define OPF_SEARCH_IN_PATH
struct cmd_list_element * lookup_cmd(const char **line, struct cmd_list_element *list, char *cmdtype, int allow_unknown, int ignore_help_classes)
static void source_verbose_cleanup(void *old_value)
static void show_command(char *, int)
void printf_filtered(const char *format,...)
const char * paddress(struct gdbarch *gdbarch, CORE_ADDR addr)
int cmd_cfunc_eq(struct cmd_list_element *cmd, cmd_cfunc_ftype *cfunc)
const char * symtab_to_fullname(struct symtab *s)
const char * get_max_completions_reached_message(void)
mach_port_t kern_return_t mach_port_t msgports mach_port_t kern_return_t pid_t pid mach_port_t kern_return_t mach_port_t task mach_port_t kern_return_t int flags
struct cmd_list_element * infolist
struct cmd_list_element * setlist
static void disassemble_current_function(int flags)
#define VEC_iterate(T, V, I, P)
#define OPF_TRY_CWD_FIRST
static void set_debug(char *, int)
script_sourcer_func * ext_lang_script_sourcer(const struct extension_language_defn *extlang)
void initialize_file_ftype(void)
void set_history(char *args, int from_tty)
static void disassemble_command(char *arg, int from_tty)
void fprintf_filtered(struct ui_file *stream, const char *format,...)
int openp(const char *, int, const char *, int, char **)
struct cmd_list_element * unsethistlist
mach_port_t mach_port_t name mach_port_t mach_port_t name error_t err
#define SYMTAB_OBJFILE(symtab)
const char * skip_spaces_const(const char *chp)
struct symbol * find_pc_function(CORE_ADDR pc)
void set_cmd_completer(struct cmd_list_element *cmd, completer_ftype *completer)
void 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_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
struct cleanup * make_cleanup_dyn_string_delete(dyn_string_t arg)
void fprintf_unfiltered(struct ui_file *stream, const char *format,...)
mach_port_t mach_port_t name mach_port_t mach_port_t name error_t int status
int get_first_line_listed(void)
void cd_command(char *dir, int from_tty)
struct cmd_list_element * showlist
struct cmd_list_element * add_com_alias(const char *name, const char *oldname, enum command_class theclass, int abbrev_flag)
struct symtabs_and_lines decode_line_1(char **argptr, int flags, struct symtab *default_symtab, int default_line)
struct cmd_list_element * add_cmd(const char *name, enum command_class theclass, cmd_cfunc_ftype *fun, const char *doc, struct cmd_list_element **list)
struct cleanup * make_cleanup(make_cleanup_ftype *function, void *arg)
struct cleanup * make_regfree_cleanup(regex_t *)
struct cmd_list_element * unsetlist
struct gdbarch * get_objfile_arch(const struct objfile *objfile)
void print_gdb_version(struct ui_file *stream)
int find_pc_partial_function(CORE_ADDR pc, const char **name, CORE_ADDR *address, CORE_ADDR *endaddr)
static const char script_ext_soft[]
static void ambiguous_line_spec(struct symtabs_and_lines *)
static void make_command(char *, int)
void source_script(const char *file, int from_tty)
struct cmd_list_element * add_info(const char *name, cmd_cfunc_ftype *fun, const char *doc)
struct gdbarch * get_current_arch(void)
void perror_warning_with_name(const char *string)
void print_source_lines(struct symtab *s, int line, int stopline, enum print_source_lines_flags flags)
void script_sourcer_func(const struct extension_language_defn *, FILE *stream, const char *filename)
void init_cmd_lists(void)
struct cmd_list_element * stoplist
struct cmd_list_element * add_alias_cmd(const char *name, const char *oldname, enum command_class theclass, int abbrev_flag, struct cmd_list_element **list)
static void list_command(char *, int)
struct cmd_list_element * setprintlist
int is_complete_command(struct cmd_list_element *c)
unsigned int max_user_call_depth
char * xstrprintf(const char *format,...)
void wrap_here(char *indent)
void printf_unfiltered(const char *format,...)
struct cmd_list_element * setdebuglist
static int valid_command_p(const char *command)
void script_from_file(FILE *stream, const char *file)
struct cmd_list_element * sethistlist
struct cmd_list_element * maintenanceprintlist
void close_most_fds(void)
void cmd_show_list(struct cmd_list_element *list, int from_tty, const char *prefix)
static void alias_command(char *args, int from_tty)
int parse_escape(struct gdbarch *gdbarch, const char **string_ptr)
void gdb_disassembly(struct gdbarch *gdbarch, struct ui_out *uiout, char *file_string, int flags, int how_many, CORE_ADDR low, CORE_ADDR high)
static void show_history_expansion_p(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
struct value * parse_to_comma_and_eval(const char **expp)
struct cmd_list_element * disablelist
static void complete_command(char *, int)
static void source_command(char *args, int from_tty)
struct cleanup * make_cleanup_fclose(FILE *file)
static void pwd_command(char *, int)
struct cmd_list_element * detachlist
void help_list(struct cmd_list_element *list, const char *cmdtype, enum command_class theclass, struct ui_file *stream)
int get_lines_to_list(void)
void 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_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
void void void void void void void void void perror_with_name(const char *string) ATTRIBUTE_NORETURN
void throw_ext_lang_unsupported(const struct extension_language_defn *extlang)
static const char *const script_ext_enums[]
int tui_is_window_visible(enum tui_win_type type)
static void show_info_verbose(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
CORE_ADDR parse_and_eval_address(const char *exp)
int valid_user_defined_cmd_name_p(const char *name)
struct ui_file * gdb_stderr
char * safe_strerror(int)
struct program_space * pspace
static void filter_sals(struct symtabs_and_lines *)
#define OPF_RETURN_REALPATH
void forget_cached_source_info(void)
#define DISASSEMBLY_RAW_INSN
char ** gdb_buildargv(const char *s)
#define VEC_address(T, V)
void quit_command(char *args, int from_tty)
int have_full_symbols(void)
static void info_command(char *, int)
struct cmd_list_element * showprintlist
static void help_command(char *, int)
struct program_space * current_program_space
void tui_show_assembly(struct gdbarch *gdbarch, CORE_ADDR addr)
char * savestring(const char *ptr, size_t len)
int find_and_open_script(const char *script_file, int search_path, FILE **streamp, char **full_pathp)
struct cmd_list_element * showhistlist
struct cmd_list_element ** prefixlist
struct cmd_list_element * maintenancelist
static dyn_string_t argv_to_dyn_string(char **argv, int n)
struct cmd_list_element * showdebuglist
void show_user_1(struct cmd_list_element *c, const char *prefix, const char *name, struct ui_file *stream)
CORE_ADDR value_as_address(struct value *val)
struct symtab_and_line * sals
static void edit_command(char *, int)
static void show_configuration(char *args, int from_tty)
int compare_strings(const void *arg1, const void *arg2)
void help_cmd(const char *command, struct ui_file *stream)
struct cmd_list_element * killlist
static const char script_ext_strict[]
void gdb_flush(struct ui_file *file)
struct ui_out * current_uiout
completer_ftype * completer
void query_if_trace_running(int from_tty)
int cli_user_command_p(struct cmd_list_element *cmd)
void error(const char *fmt,...)
static void show_remote_timeout(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static void source_script_with_search(const char *file, int from_tty, int search_path)
struct cmd_list_element * add_com(const char *name, enum command_class theclass, cmd_cfunc_ftype *fun, const char *doc)
initialize_file_ftype _initialize_cli_cmds
mach_port_t mach_port_t name mach_port_t mach_port_t name error_t int int rusage_t pid_t pid
int ext_lang_present_p(const struct extension_language_defn *extlang)
struct gdbarch * get_frame_arch(struct frame_info *this_frame)
static void show_max_user_call_depth(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
void do_cleanups(struct cleanup *old_chain)
void add_setshow_boolean_cmd(const char *name, enum command_class theclass, int *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
static void source_script_from_stream(FILE *stream, const char *file)
static const char * script_ext_mode
void show_commands(char *args, int from_tty)
CORE_ADDR tui_get_low_disassembly_address(struct gdbarch *gdbarch, CORE_ADDR low, CORE_ADDR pc)
const ULONGEST const LONGEST len