22 #include "readline/readline.h" 23 #include "readline/tilde.h" 34 #include "filenames.h" 66 const char *format, ...)
187 error (
_(
"Argument required (%s)."), why);
198 "the name of an info command.\n"));
236 " completion is disabled.\n"));
248 int quote_char =
'\0';
261 tracker = &tracker_handle_brkchars;
264 complete_line (tracker_handle_completions, word, arg, strlen (arg));
265 tracker = &tracker_handle_completions;
303 arg_prefix.c_str (), word,
345 error (
_(
"Not confirmed."));
349 quit_force (args ? &exit_code : NULL, from_tty);
356 error (
_(
"The \"pwd\" command does not take an argument: %s"), args);
361 error (
_(
"Error finding name of working directory: %s"),
384 (tilde_expand (dir != NULL ? dir :
"~"));
385 dir = dir_holder.get ();
390 #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_holder.get ()))
424 dir_holder.get (), (
char *) NULL);
432 if (IS_DIR_SEPARATOR (p[0]) && p[1] ==
'.' 433 && (p[2] == 0 || IS_DIR_SEPARATOR (p[2])))
434 memmove (p, p + 2, strlen (p + 2) + 1);
435 else if (IS_DIR_SEPARATOR (p[0]) && p[1] ==
'.' && p[2] ==
'.' 436 && (p[3] == 0 || IS_DIR_SEPARATOR (p[3])))
453 memmove (q - 1, p + 3, strlen (p + 3) + 1);
482 _(
"Script filename extension recognition is \"%s\".\n"),
511 file.get (), O_RDONLY, &temp_path);
517 FILE *result = fdopen (fd, FOPEN_RT);
520 int save_errno = errno;
540 const char *file_to_open)
555 sourcer (extlang, stream, file_to_open);
580 if (file == NULL || *file == 0)
581 error (
_(
"source command requires file name of file to source."));
605 search_path ? opened->
full_path.get () : file);
620 const char *file = args;
633 while (args[0] !=
'\0')
642 if (args[1] ==
'v' && isspace (args[2]))
649 else if (args[1] ==
's' && isspace (args[2]))
670 const char *p = text;
674 while ((c = *p++) !=
'\0')
699 #if defined(CANT_FORK) || \ 700 (!defined(HAVE_WORKING_VFORK) && !defined(HAVE_WORKING_FORK)) 703 int rc = system (arg ? arg :
"");
706 arg =
"inferior shell";
727 if ((
pid = vfork ()) == 0)
729 const char *p, *user_shell;
733 if ((user_shell = (
char *) getenv (
"SHELL")) == NULL)
734 user_shell =
"/bin/sh";
737 p = lbasename (user_shell);
740 execl (user_shell, p, (
char *) 0);
742 execl (user_shell, p,
"-c", arg, (
char *) 0);
786 error (
_(
"No default source file yet."));
797 std::vector<symtab_and_line> sals =
decode_line_1 (location.get (),
807 if (sals.size () > 1)
810 _(
"Specified line is ambiguous:\n"));
817 error (
_(
"Junk at end of line specification."));
828 error (
_(
"No source file for address %s."),
850 error (
_(
"No line number known for %s."), arg);
853 if ((editor = (
char *) getenv (
"EDITOR")) == NULL)
877 if (arg == NULL || ((arg[0] ==
'+' || arg[0] ==
'-') && arg[1] ==
'\0'))
894 if (arg != NULL && arg[0] ==
'-' 903 else if (arg == NULL || arg[0] ==
'+')
909 else if (arg[0] ==
'-')
912 error (
_(
"Already at the start of %s."),
930 error (
_(
"No symbol table is loaded. Use the \"file\" command."));
932 std::vector<symtab_and_line> sals;
956 for (p = arg; p != arg1 && *p >=
'0' && *p <=
'9'; p++);
957 linenum_beg = (p == arg1);
961 const char *beg = arg;
962 size_t beg_len = arg1 - beg;
964 while (*arg1 ==
' ' || *arg1 ==
'\t')
969 if (sals.size () > 1)
972 _(
"Specified first line '%.*s' is ambiguous:\n"),
977 while (*arg1 ==
' ' || *arg1 ==
'\t')
985 const char *end_arg = arg1;
990 std::vector<symtab_and_line> sals_end
998 if (sals_end.empty ())
1000 if (sals_end.size () > 1)
1003 _(
"Specified last line '%s' is ambiguous:\n"),
1007 sal_end = sals_end[0];
1012 error (
_(
"Junk at end of line specification."));
1014 if (!no_end && !dummy_beg && !dummy_end
1016 error (
_(
"Specified first and last lines are in different files."));
1017 if (dummy_beg && dummy_end)
1018 error (
_(
"Two empty args do not say what lines to list."));
1030 error (
_(
"No source file for address %s."),
1050 if (!linenum_beg && sal.
symtab == 0)
1051 error (
_(
"No line number known for %s."), arg);
1059 if (dummy_beg && sal_end.
symtab == 0)
1060 error (
_(
"No default source file yet. Do \"help list\"."));
1064 sal_end.
line + 1, 0);
1065 else if (sal.
symtab == 0)
1066 error (
_(
"No default source file yet. Do \"help list\"."));
1069 for (
int i = 0; i < sals.size (); i++)
1075 if (sals.size () > 1)
1087 : sal_end.
line + 1),
1100 gdb_disassembly_flags
flags)
1142 error (
_(
"No function contains program counter for selected frame."));
1186 gdb_disassembly_flags
flags;
1198 error (
_(
"Missing modifier."));
1200 while (*p && ! isspace (*p))
1214 error (
_(
"Invalid disassembly modifier."));
1223 error (
_(
"Cannot specify both /m and /s."));
1239 error (
_(
"No function contains specified address."));
1290 const char *comname = args;
1294 error (
_(
"Not a user command."));
1313 if (searchstr == NULL)
1314 error (
_(
"REGEXP string is empty"));
1317 _(
"Error in regular expression"));
1338 for (i = 0; i < n; ++i)
1364 while (*command ==
' ' || *command ==
'\t')
1366 return *command ==
'\0';
1374 error (
_(
"Usage: alias [-a] [--] ALIAS = COMMAND"));
1382 int i, alias_argc, command_argc;
1385 const char *
alias, *command;
1387 if (args == NULL || strchr (args,
'=') == NULL)
1390 equals = strchr (args,
'=');
1393 gdb_argv built_alias_argv (args2.c_str ());
1394 gdb_argv command_argv (equals + 1);
1396 char **alias_argv = built_alias_argv.get ();
1397 while (alias_argv[0] != NULL)
1399 if (strcmp (alias_argv[0],
"-a") == 0)
1404 else if (strcmp (alias_argv[0],
"--") == 0)
1413 if (alias_argv[0] == NULL || command_argv[0] == NULL
1414 || *alias_argv[0] ==
'\0' || *command_argv[0] ==
'\0')
1417 for (i = 0; alias_argv[i] != NULL; ++i)
1422 error (
_(
"Invalid command name: %s"), alias_argv[i]);
1424 error (
_(
"Invalid command element name: %s"), alias_argv[i]);
1428 alias_argc = countargv (alias_argv);
1429 command_argc = command_argv.count ();
1436 command = command_string.c_str ();
1438 error (
_(
"Invalid command to alias to: %s"), command);
1442 alias = alias_string.c_str ();
1455 if (alias_argc == 1)
1463 const char *alias_prefix, *command_prefix;
1466 if (alias_argc != command_argc)
1467 error (
_(
"Mismatched command length between ALIAS and COMMAND."));
1475 alias_prefix = alias_prefix_string.c_str ();
1476 command_prefix = command_prefix_string.c_str ();
1484 if (c_alias != c_command)
1485 error (
_(
"ALIAS and COMMAND prefixes do not match."));
1489 command_argv[command_argc - 1],
1503 const char *sym_name = NULL;
1508 sal.
line, sym_name != NULL ? sym_name :
"???");
1520 const char *format, ...)
1523 va_start (ap, format);
1527 for (
const auto &sal : sals)
1546 else if (dirb == NULL)
1553 r = filename_cmp (dira, dirb);
1564 return sala.
line == salb.
line ? 0 : 1;
1574 auto from = std::remove_if (sals.begin (), sals.end (),
1579 std::sort (sals.begin (), from,
1583 from = std::unique (sals.begin (), from,
1588 sals.erase (from, sals.end ());
1595 "the name of a debug subcommand.\n"));
1618 _(
"Verbose printing of informational messages is %s.\n"),
1645 _(
"Timeout limit to wait for target to respond is %s.\n"),
1654 _(
"The max call depth for user-defined commands is %s.\n"),
1667 Maintenance commands.\n\ 1668 Some gdb commands are provided just for use by gdb maintainers.\n\ 1669 These commands are subject to frequent change, and may not be as\n\ 1670 well documented as user commands."),
1674 _(
"Aliases of other commands."), &
cmdlist);
1676 User-defined commands.\n\ 1677 The commands in this class are those defined by the user.\n\ 1678 Use the \"define\" command to define a command."), &
cmdlist);
1685 _(
"Making program stop at certain points."), &
cmdlist);
1688 Examining the stack.\n\ 1689 The stack is made up of stack frames. Gdb assigns numbers to stack frames\n\ 1690 counting from zero for the innermost (currently executing) frame.\n\n\ 1691 At any time gdb identifies one frame as the \"selected\" frame.\n\ 1692 Variable lookups are done with respect to the selected frame.\n\ 1693 When the program being debugged stops, gdb selects the innermost frame.\n\ 1694 The commands below can be used to select other frames by number or address."),
1701 Print working directory. This is used for your program as well."));
1704 Set working directory to DIR for debugger.\n\ 1705 The debugger's current working directory specifies where scripts and other\n\ 1706 files that can be loaded by GDB are located.\n\ 1707 In order to change the inferior's current working directory, the recommended\n\ 1708 way is to use the \"set cwd\" command."), &
cmdlist);
1712 Print a constant string. Give string as argument.\n\ 1713 C escape sequences may be used in the argument.\n\ 1714 No newline is added at the end of the argument;\n\ 1715 use \"\\n\" if you want a newline to be printed.\n\ 1716 Since leading and trailing whitespace are ignored in command arguments,\n\ 1717 if you want to print some you must use \"\\\" before leading whitespace\n\ 1718 to be printed or after trailing whitespace."));
1722 Set mode for script filename extension recognition."),
_(
"\ 1723 Show mode for script filename extension recognition."),
_(
"\ 1724 off == no filename extension recognition (all sourced files are GDB scripts)\n\ 1725 soft == evaluate script according to filename extension, fallback to GDB script" 1727 strict == evaluate script according to filename extension, error if not supported" 1735 Usage: quit [EXPR]\n\ 1736 The optional expression EXPR, if present, is evaluated and the result\n\ 1737 used as GDB's exit code. The default is zero."));
1739 _(
"Print list of commands."));
1745 Set verbosity."),
_(
"\ 1746 Show verbosity."), NULL,
1752 _(
"Generic command for setting command history parameters."),
1755 _(
"Generic command for showing command history parameters."),
1759 Set history expansion on command input."),
_(
"\ 1760 Show history expansion on command input."),
_(
"\ 1761 Without an argument, history expansion is enabled."),
1767 Generic command for showing things about the program being debugged."),
1773 _(
"List the completions for the rest of the line as a command."));
1776 Generic command for showing things about the debugger."),
1782 Show the history of commands you typed.\n\ 1783 You can supply a command number to start with, or a `+' to start after\n\ 1784 the previous command number shown."),
1788 _(
"Show what version of GDB this is."), &
showlist);
1791 _(
"Show how GDB was configured at build time."), &
showlist);
1794 Set debugging of remote protocol."),
_(
"\ 1795 Show debugging of remote protocol."),
_(
"\ 1796 When enabled, each packet sent or received with the remote target\n\ 1804 Set timeout limit to wait for target to respond."),
_(
"\ 1805 Show timeout limit to wait for target to respond."),
_(
"\ 1806 This value is used to set the time limit for gdb to wait for a response\n\ 1813 _(
"Generic command for setting gdb debugging flags"),
1817 _(
"Generic command for showing gdb debugging flags"),
1821 Execute the rest of the line as a shell command.\n\ 1822 With no arguments, run an inferior shell."));
1826 Edit specified file or function.\n\ 1827 With no argument, edits file containing most recent line listed.\n\ 1828 Editing targets can be specified in these ways:\n\ 1829 FILE:LINENUM, to edit at that line in that file,\n\ 1830 FUNCTION, to edit at the beginning of that function,\n\ 1831 FILE:FUNCTION, to distinguish among like-named static functions.\n\ 1832 *ADDRESS, to edit at the line containing that address.\n\ 1833 Uses EDITOR environment variable contents as editor (or ex as default)."));
1838 List specified function or line.\n\ 1839 With no argument, lists ten more lines after or around previous listing.\n\ 1840 \"list -\" lists the ten lines before a previous ten-line listing.\n\ 1841 One argument specifies a line, and ten lines are listed around that line.\n\ 1842 Two arguments with comma between specify starting and ending lines to list.\n\ 1843 Lines can be specified in these ways:\n\ 1844 LINENUM, to list around that line in current file,\n\ 1845 FILE:LINENUM, to list around that line in that file,\n\ 1846 FUNCTION, to list around beginning of that function,\n\ 1847 FILE:FUNCTION, to distinguish among like-named static functions.\n\ 1848 *ADDRESS, to list around the line containing that address.\n\ 1849 With two args, if one is empty, it stands for ten lines away from\n\ 1852 By default, when a single location is given, display ten lines.\n\ 1853 This can be changed using \"set listsize\", and the current value\n\ 1854 can be shown using \"show listsize\"."));
1862 Disassemble a specified section of memory.\n\ 1863 Default is the function surrounding the pc of the selected frame.\n\ 1865 With a /m modifier, source lines are included (if available).\n\ 1866 This view is \"source centric\": the output is in source line order,\n\ 1867 regardless of any optimization that is present. Only the main source file\n\ 1868 is displayed, not those of, e.g., any inlined functions.\n\ 1869 This modifier hasn't proved useful in practice and is deprecated\n\ 1872 With a /s modifier, source lines are included (if available).\n\ 1873 This differs from /m in two important respects:\n\ 1874 - the output is still in pc address order, and\n\ 1875 - file names and contents for all relevant source files are displayed.\n\ 1877 With a /r modifier, raw instructions in hex are included.\n\ 1879 With a single argument, the function surrounding that address is dumped.\n\ 1880 Two arguments (separated by a comma) are taken as a range of memory to dump,\n\ 1881 in the form of \"start,end\", or \"start,+length\".\n\ 1883 Note that the address is interpreted as an expression, not as a location\n\ 1884 like in the \"break\" command.\n\ 1885 So, for example, if you want to disassemble function bar in file foo.c\n\ 1886 you must type \"disassemble 'foo.c'::bar\" and not \"disassemble foo.c:bar\"."));
1892 Run the ``make'' program using the rest of the line as arguments."));
1895 Show definitions of non-python/scheme user defined commands.\n\ 1896 Argument is the name of the user defined command.\n\ 1897 With no argument, show definitions of all user defined commands."), &
showlist);
1899 _(
"Search for commands matching a REGEXP"));
1903 Set the max call depth for non-python/scheme user-defined commands."),
_(
"\ 1904 Show the max call depth for non-python/scheme user-defined commands."), NULL,
1910 Set tracing of GDB CLI commands."),
_(
"\ 1911 Show state of GDB CLI command tracing."),
_(
"\ 1912 When 'on', each command is displayed as it is executed."),
1918 Define a new command that is an alias of an existing command.\n\ 1919 Usage: alias [-a] [--] ALIAS = COMMAND\n\ 1920 ALIAS is the name of the alias command to create.\n\ 1921 COMMAND is the command being aliased to.\n\ 1922 If \"-a\" is specified, the command is an abbreviation,\n\ 1923 and will not appear in help command list output.\n\ 1926 Make \"spe\" an alias of \"set print elements\":\n\ 1927 alias spe = set print elements\n\ 1928 Make \"elms\" an alias of \"elements\" in the \"set print\" command:\n\ 1929 alias -a set print elms = set print elements"));
1936 char *source_help_text;
1939 Read commands from a file named FILE.\n\ 1941 Usage: source [-s] [-v] FILE\n\ 1942 -s: search for the script in the source search path,\n\ 1943 even if FILE contains directories.\n\ 1944 -v: each command in FILE is echoed as it is executed.\n\ 1946 Note that the file \"%s\" is read automatically in this way\n\ 1947 when GDB is started."),
gdbinit);
void error_no_arg(const char *why)
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 void echo_command(const char *text, int from_tty)
static const char script_ext_off[]
CORE_ADDR get_frame_address_in_block(struct frame_info *this_frame)
struct frame_info * get_selected_frame(const char *message)
#define SYMBOL_PRINT_NAME(symbol)
static void shell_escape(const char *arg, int from_tty)
struct cmd_list_element * showchecklist
mach_port_t mach_port_t name mach_port_t mach_port_t name kern_return_t int int rusage_t pid_t pid
struct cmd_list_element * enablelist
LONGEST value_as_long(struct value *val)
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)
int cmd_cfunc_eq(struct cmd_list_element *cmd, cmd_const_cfunc_ftype *cfunc)
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 cmd_list_element * add_info(const char *name, cmd_const_cfunc_ftype *fun, const char *doc)
struct cmd_list_element * lookup_cmd(const char **line, struct cmd_list_element *list, const char *cmdtype, int allow_unknown, int ignore_help_classes)
CORE_ADDR gdbarch_deprecated_function_start_offset(struct gdbarch *gdbarch)
struct cmd_list_element * deletelist
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_const_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
struct cmd_list_element * maintenancechecklist
struct cmd_list_element * add_cmd(const char *name, enum command_class theclass, const char *doc, struct cmd_list_element **list)
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)
void filename_completer(struct cmd_list_element *ignore, completion_tracker &tracker, const char *text, const char *word)
int have_partial_symbols(void)
static void set_debug(const char *arg, int from_tty)
static void show_debug(const char *args, int from_tty)
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 vprintf_filtered(const char *format, va_list args)
#define OPF_SEARCH_IN_PATH
static void disassemble_command(const char *arg, int from_tty)
static void make_command(const char *arg, int from_tty)
void complete_line(completion_tracker &tracker, const char *text, const char *line_buffer, int point)
void printf_filtered(const char *format,...)
const char * paddress(struct gdbarch *gdbarch, CORE_ADDR addr)
void set_current_program_space(struct program_space *pspace)
const char * symtab_to_fullname(struct symtab *s)
struct cmd_list_element * add_prefix_cmd(const char *name, enum command_class theclass, cmd_const_cfunc_ftype *fun, const char *doc, struct cmd_list_element **prefixlist, const char *prefixname, int allow_unknown, struct cmd_list_element **list)
const char * get_max_completions_reached_message(void)
scoped_restore_tmpl< T > make_scoped_restore(T *var)
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
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_const_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
void show_history(const char *args, int from_tty)
static void pwd_command(const char *args, int from_tty)
#define CATCH(EXCEPTION, MASK)
std::unique_ptr< FILE, gdb_file_deleter > gdb_file_up
static std::string argv_to_string(char **argv, int n)
#define OPF_TRY_CWD_FIRST
std::unique_ptr< T, xfree_deleter< T > > unique_xmalloc_ptr
script_sourcer_func * ext_lang_script_sourcer(const struct extension_language_defn *extlang)
static void complete_command(const 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
#define SYMTAB_OBJFILE(symtab)
bool use_custom_word_point() const
struct symbol * find_pc_function(CORE_ADDR pc)
void set_cmd_completer(struct cmd_list_element *cmd, completer_ftype *completer)
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_const_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
void fprintf_unfiltered(struct ui_file *stream, const char *format,...)
void set_repeat_arguments(const char *args)
int get_first_line_listed(void)
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)
void quit_force(int *exit_arg, int from_tty)
void command_completer(struct cmd_list_element *ignore, completion_tracker &tracker, const char *text, const char *word)
static void ambiguous_line_spec(gdb::array_view< const symtab_and_line > sals, const char *format,...) ATTRIBUTE_PRINTF(2
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[]
void source_script(const char *file, int from_tty)
struct gdbarch * get_current_arch(void)
void perror_warning_with_name(const char *string)
void script_sourcer_func(const struct extension_language_defn *, FILE *stream, const char *filename)
mach_port_t mach_port_t name mach_port_t mach_port_t name kern_return_t int status
void init_cmd_lists(void)
struct cmd_list_element * stoplist
std::unique_ptr< event_location, event_location_deleter > event_location_up
static void source_command(const char *args, int from_tty)
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 printf_unfiltered(const char *format,...)
struct cmd_list_element * setdebuglist
static int valid_command_p(const char *command)
void _initialize_cli_cmds(void)
void script_from_file(FILE *stream, const char *file)
static void info_command(const char *arg, int from_tty)
struct cmd_list_element * sethistlist
void quit_command(const char *args, int from_tty)
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(const char *args, int from_tty)
static void list_command(const char *arg, int from_tty)
int parse_escape(struct gdbarch *gdbarch, const char **string_ptr)
struct cmd_list_element * add_alias_cmd(const char *name, cmd_list_element *old, enum command_class theclass, int abbrev_flag, struct cmd_list_element **list)
const char * completion_find_completion_word(completion_tracker &tracker, const char *text, int *quote_char)
static void show_history_expansion_p(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
std::vector< symtab_and_line > decode_line_1(const struct event_location *location, int flags, struct program_space *search_pspace, struct symtab *default_symtab, int default_line)
completion_result build_completion_result(const char *text, int start, int end)
void wrap_here(const char *indent)
static void disassemble_current_function(gdb_disassembly_flags flags)
struct value * parse_to_comma_and_eval(const char **expp)
struct cmd_list_element * disablelist
void location_completer(struct cmd_list_element *ignore, completion_tracker &tracker, const char *text, const char *)
void apropos_cmd(struct ui_file *stream, struct cmd_list_element *commandlist, compiled_regex ®ex, const char *prefix)
void show_commands(const char *args, int from_tty)
static void show_command(const char *arg, int from_tty)
struct cmd_list_element * detachlist
static int cmp_symtabs(const symtab_and_line &sala, const symtab_and_line &salb)
void help_list(struct cmd_list_element *list, const char *cmdtype, enum command_class theclass, struct ui_file *stream)
T & emplace(Args &&... args)
int get_lines_to_list(void)
static void help_command(const char *command, int from_tty)
const struct language_defn * current_language
void void void void void void void void void perror_with_name(const char *string) ATTRIBUTE_NORETURN
void gdb_disassembly(struct gdbarch *gdbarch, struct ui_out *uiout, gdb_disassembly_flags flags, int how_many, CORE_ADDR low, CORE_ADDR high)
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)
static void show_user(const char *args, int from_tty)
void print_source_lines(struct symtab *s, int line, int stopline, print_source_lines_flags flags)
static void source_script_from_stream(FILE *stream, const char *file, const char *file_to_open)
char * safe_strerror(int)
struct program_space * pspace
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_const_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
static void static void filter_sals(std::vector< symtab_and_line > &)
#define OPF_RETURN_REALPATH
void forget_cached_source_info(void)
void cd_command(const char *dir, int from_tty)
int have_full_symbols(void)
struct cmd_list_element * showprintlist
static void print_disassembly(struct gdbarch *gdbarch, const char *name, CORE_ADDR low, CORE_ADDR high, gdb_disassembly_flags flags)
struct program_space * current_program_space
struct value * parse_and_eval(const char *exp)
void tui_show_assembly(struct gdbarch *gdbarch, CORE_ADDR addr)
static void shell_command(const char *arg, int from_tty)
static void alias_usage_error(void)
char * savestring(const char *ptr, size_t len)
struct cmd_list_element * showhistlist
struct cmd_list_element ** prefixlist
struct cmd_list_element * maintenancelist
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)
gdb::unique_xmalloc_ptr< char > full_path
static void apropos_command(const char *searchstr, int from_tty)
void set_verbose(const char *args, int from_tty, struct cmd_list_element *c)
void help_cmd(const char *command, struct ui_file *stream)
struct cmd_list_element * killlist
static const char script_ext_strict[]
static void show_version(const char *args, int from_tty)
void gdb_flush(struct ui_file *file)
struct cmd_list_element * add_com(const char *name, enum command_class theclass, cmd_const_cfunc_ftype *fun, const char *doc)
static void edit_command(const char *arg, int from_tty)
completer_ftype * completer
static void print_sal_location(const symtab_and_line &sal)
void query_if_trace_running(int from_tty)
static void show_configuration(const char *args, int from_tty)
int cli_user_command_p(struct cmd_list_element *cmd)
void set_history(const char *args, int from_tty)
event_location_up string_to_event_location(const char **stringp, const struct language_defn *language, symbol_name_match_type match_type)
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_const_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
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)
int ext_lang_present_p(const struct extension_language_defn *extlang)
gdb::optional< open_script > find_and_open_script(const char *script_file, int search_path)
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)
static const char * script_ext_mode
CORE_ADDR tui_get_low_disassembly_address(struct gdbarch *gdbarch, CORE_ADDR low, CORE_ADDR pc)