38#include "gdbsupport/job-control.h"
43#include "gdbsupport/version.h"
46#include "gdbsupport/event-loop.h"
54#include "gdbsupport/gdb_select.h"
55#include "gdbsupport/scope-exit.h"
57#include "gdbsupport/pathstuff.h"
62#include "readline/readline.h"
63#include "readline/history.h"
89#define PROMPT(X) the_prompts.prompt_stack[the_prompts.top + X].prompt
90#define PREFIX(X) the_prompts.prompt_stack[the_prompts.top + X].prefix
91#define SUFFIX(X) the_prompts.prompt_stack[the_prompts.top + X].suffix
96#define DEFAULT_PROMPT "(gdb) "
140 gdb_printf (file, _(
"Whether to confirm potentially "
141 "dangerous operations is %s.\n"),
198#ifdef HAVE_USEFUL_SBRK
239char *(*deprecated_readline_hook) (
const char *);
252 const char *cmd,
int from_tty);
283 setbuf (stream,
nullptr);
288 setbuf (stream,
nullptr);
328 scoped_restore save_instream
329 = make_scoped_restore (&
ui->
instream, stream);
337 std::string command_buffer;
340 if (command ==
nullptr)
348do_chdir_cleanup (
void *old_dir)
350 chdir ((
const char *) old_dir);
374 static int warned = 0;
417 scoped_restore save_ui = make_scoped_restore (&
current_ui);
427 while (gdb_do_one_event () >= 0)
463 const char *cmd_start = p;
471 cleanup_if_error.release ();
475 std::string cmd_copy = p;
479 while (*p ==
' ' || *p ==
'\t')
486 std::string default_args_and_arg;
497 scoped_restore save_repeat_args
499 const char *args_pointer = p;
507 arg = default_args_and_arg.c_str ();
512 arg = *p ==
'\0' ?
nullptr : p;
525 std::string without_whitespace;
530 const char *old_end = arg + strlen (arg) - 1;
532 while (p >= arg && (*p ==
' ' || *p ==
'\t'))
536 without_whitespace = std::string (arg, p + 1);
537 arg = without_whitespace.c_str ();
558 std::string prefixname_no_space
561 (
"\"%s\" must be followed by the name of a subcommand.\n",
562 prefixname_no_space.c_str ());
571 error (_(
"That is not a command, just a help topic."));
583 const char *cmd2 = cmd_copy.c_str ();
603 cleanup_if_error.release ();
615 scoped_restore save_async = make_scoped_restore (&
current_ui->
async, 0);
620 scoped_restore save_stdout
622 scoped_restore save_stderr
624 scoped_restore save_stdlog
626 scoped_restore save_stdtarg
628 scoped_restore save_stdtargerr
662 const char *p,
int from_tty)
728 error (_(
"No previous command to relaunch"));
734scoped_restore_tmpl<int>
769static gdb::unique_xmalloc_ptr<char>
777 int fd = fileno (stream);
798 FD_SET (fd, &readfds);
806 perror_with_name ((
"select"));
860 gdb_printf (file, _(
"Saving of the history record on exit is %s.\n"),
863 gdb_printf (file, _(
"Saving of the history is disabled due to "
864 "the value of 'history filename'.\n"));
875 gdb_printf (file, _(
"The size of the command history is %s.\n"),
888 _(
"The number of history entries to look back at for "
889 "duplicates is %s.\n"),
899 gdb_printf (file, _(
"The filename in which to record "
900 "the command history is \"%ps\".\n"),
903 gdb_printf (file, _(
"There is no filename currently set for "
904 "recording the command history in.\n"));
985 ? rl_already_prompted : 0),
1052 rl_already_prompted = 1;
1055 (*after_char_processing_hook) ();
1058 while (gdb_do_one_event () >= 0)
1078 rl_get_previous_history (delta, 0);
1085 rl_pre_input_hook = NULL;
1102 where = where_history();
1104 if ((history_is_stifled () && (history_length >= history_max_entries))
1105 || (where >= history_length - 1))
1110 return rl_newline (1, key);
1127 int lookbehind_threshold;
1140 for (lookbehind = 0; lookbehind < lookbehind_threshold; lookbehind++)
1142 HIST_ENTRY *temp = previous_history ();
1147 if (strcmp (temp->line, command) == 0)
1149 HIST_ENTRY *prev = remove_history (where_history ());
1151 free_history_entry (prev);
1158 add_history (command);
1167 int ret, saved_errno;
1169 std::string local_history_filename
1170 = string_printf (
"%s-gdb%ld~",
history_filename.c_str (), (
long) getpid ());
1173 saved_errno = errno;
1174 if (ret < 0 && saved_errno != ENOENT)
1176 warning (_(
"Could not rename %ps to %ps: %s"),
1180 local_history_filename.c_str ()),
1181 safe_strerror (saved_errno));
1195 gdb_assert (saved_errno == ENOENT);
1196 write_history (local_history_filename.c_str ());
1200 append_history (
command_count, local_history_filename.c_str ());
1201 if (history_is_stifled ())
1202 history_truncate_file (local_history_filename.c_str (),
1203 history_max_entries);
1207 saved_errno = errno;
1208 if (ret < 0 && saved_errno != EEXIST)
1209 warning (_(
"Could not rename %s to %s: %s"),
1211 safe_strerror (saved_errno));
1227 const char *annotation_suffix)
1230 const char *prompt = prompt_arg;
1235 if (annotation_suffix == NULL)
1236 annotation_suffix =
"";
1243 = (
char *) alloca ((prompt == NULL ? 0 : strlen (prompt))
1244 + strlen (annotation_suffix) + 40);
1246 local_prompt[0] =
'\0';
1248 strcpy (local_prompt, prompt);
1249 strcat (local_prompt,
"\n\032\032");
1250 strcat (local_prompt, annotation_suffix);
1251 strcat (local_prompt,
"\n");
1253 prompt = local_prompt;
1258 signal (SIGTSTP, handle_sigtstp);
1263 gdb::unique_xmalloc_ptr<char> rl;
1296 0, annotation_suffix);
1297 if (cmd == (
char *) EOF)
1313 signal (SIGTSTP, SIG_DFL);
1334 "Copyright (C) 2023 Free Software Foundation, Inc.\n");
1342License GPLv3+: GNU GPL version 3 or later <%ps>\
1343\nThis is free software: you are free to change and redistribute it.\n\
1344There is NO WARRANTY, to the extent permitted by law.",
1346 "http://gnu.org/licenses/gpl.html"));
1351 gdb_printf (stream, (
"\nType \"show copying\" and "
1352 "\"show warranty\" for details.\n"));
1356 gdb_printf (stream,
"This GDB was configured as \"");
1368 gdb_printf (stream, _(
"Type \"show configuration\" "
1369 "for configuration details.\n"));
1374 _(
"For bug reporting instructions, please see:\n"));
1380 _(
"Find the GDB manual and other documentation \
1381resources online at:\n <%ps>."),
1383 "http://www.gnu.org/software/gdb/documentation/"));
1385 gdb_printf (stream, _(
"For help, type \"help\".\n"));
1387 _(
"Type \"apropos word\" to search for commands \
1388related to \"word\"."));
1396This GDB was configured as follows:\n\
1397 configure --host=%s --target=%s\n\
1401 --with-auto-load-dir=%s\n\
1402 --with-auto-load-safe-path=%s\n\
1417 --with-gdb-datadir=%s%s\n\
1422 --with-iconv-bin=%s%s\n\
1423"), ICONV_BIN, ICONV_BIN_RELOCATABLE ?
" (relocatable)" :
"");
1428 --with-jit-reader-dir=%s%s\n\
1431#if HAVE_LIBUNWIND_IA64_H
1433 --with-libunwind-ia64\n\
1437 --without-libunwind-ia64\n\
1451#if HAVE_LIBBABELTRACE
1453 --with-babeltrace\n\
1457 --without-babeltrace\n\
1467 --without-intel-pt\n\
1480#ifdef WITH_PYTHON_PATH
1482 --with-python=%s%s\n\
1489#ifdef WITH_PYTHON_LIBDIR
1491 --with-python-libdir=%s%s\n\
1495 --without-python-libdir\n\
1499#if HAVE_LIBDEBUGINFOD
1501 --with-debuginfod\n\
1505 --without-debuginfod\n\
1531 --with-amd-dbgapi\n\
1535 --without-amd-dbgapi\n\
1539#if HAVE_SOURCE_HIGHLIGHT
1541 --enable-source-highlight\n\
1545 --disable-source-highlight\n\
1551 --enable-threading\n\
1555 --disable-threading\n\
1569#ifdef HAVE_READLINE_READLINE_H
1571 --with-system-readline\n\
1575 --without-system-readline\n\
1581 --with-relocated-sources=%s\n\
1587 --with-separate-debug-dir=%s%s\n\
1590#ifdef ADDITIONAL_DEBUG_DIRS
1592 --with-additional-debug-dirs=%s\n\
1593"), ADDITIONAL_DEBUG_DIRS);
1598 --with-sysroot=%s%s\n\
1603 --with-system-gdbinit=%s%s\n\
1608 --with-system-gdbinit-dir=%s%s\n\
1614(\"Relocatable\" means the directory can be moved with the GDB installation\n\
1615tree, and GDB will still find it.)\n\
1658 if (
inf->attach_flag)
1675 if (
inf->attach_flag)
1677 _(
"\tInferior %d [%s] will be detached.\n"),
inf->num,
1681 _(
"\tInferior %d [%s] will be killed.\n"),
inf->num,
1698 stb.
puts (_(
"A debugging session is active.\n\n"));
1703 stb.
puts (_(
"\nQuit anyway? "));
1747 exit_code = *exit_arg;
1764 catch (
const gdb_exception &ex)
1775 inf->pop_all_targets ();
1777 catch (
const gdb_exception &ex)
1805 catch (
const gdb_exception &ex)
1819 do_final_cleanups ();
1821 catch (
const gdb_exception &ex)
1841 gdb_printf (file,
"Debugger's interactive mode "
1842 "is %s (currently %s).\n",
1859#define Hist_print 10
1874 if (args[0] ==
'+' && args[1] ==
'\0')
1903 gdb_printf (
"%5d %s\n", history_base + offset,
1904 (history_get (history_base + offset))->line);
1914 if (from_tty && args)
1925 gdb_assert (history_size >= -1);
1927 if (history_size == -1)
1928 unstifle_history ();
1930 stifle_history (history_size);
1947 const char *cmdname =
"verbose";
1959 c->
doc = _(
"Set verbose printing of informational messages.");
1960 showcmd->
doc = _(
"Show verbose printing of informational messages.");
1964 c->
doc = _(
"Set verbosity.");
1965 showcmd->
doc = _(
"Show verbosity.");
1981 tmpenv = getenv (
"GDBHISTSIZE");
1988 tmpenv = skip_spaces (tmpenv);
1990 var = strtol (tmpenv, &endptr, 10);
1991 saved_errno = errno;
1992 endptr = skip_spaces (endptr);
1999 if (*endptr !=
'\0')
2001 else if (*tmpenv ==
'\0'
2008 || (
var == INT_MAX && saved_errno == ERANGE))
2047 gdb_printf (file, _(
"Editing of command lines as "
2048 "they are typed is %s.\n"),
2063 gdb_printf (file, _(
"Notification of completion for "
2064 "asynchronous execution commands is %s.\n"),
2096 gdb_printf (file, _(
"GDB's data directory is \"%ps\".\n"),
2133 gdb_printf (file, _(
"Whether to start up quietly is %s.\n"),
2155 rl_readline_name =
"gdb";
2156 rl_terminal_name = getenv (
"TERM");
2165 _(
"Set gdb's prompt."),
2166 _(
"Show gdb's prompt."),
2172Don't repeat this command.\nPrimarily \
2173used inside of user-defined commands that should not be repeated when\n\
2178Set editing of command lines as they are typed."), _(
"\
2179Show editing of command lines as they are typed."), _(
"\
2180Use \"on\" to enable the editing, and \"off\" to disable it.\n\
2181Without an argument, command line editing is enabled. To edit, use\n\
2182EMACS-like or VI-like commands like control-P or ESC."),
2188Set saving of the history record on exit."), _(
"\
2189Show saving of the history record on exit."), _(
"\
2190Use \"on\" to enable the saving, and \"off\" to disable it.\n\
2191Without an argument, saving is enabled."),
2198Set the size of the command history."), _(
"\
2199Show the size of the command history."), _(
"\
2200This is the number of previous commands to keep a record of.\n\
2201If set to \"unlimited\", the number of commands kept in the history\n\
2202list is unlimited. This defaults to the value of the environment\n\
2203variable \"GDBHISTSIZE\", or to 256 if this variable is not set."),
2210Set how far back in history to look for and remove duplicate entries."), _(
"\
2211Show how far back in history to look for and remove duplicate entries."), _(
"\
2212If set to a nonzero value N, GDB will look back at the last N history entries\n\
2213and remove the first history entry that is a duplicate of the most recent\n\
2214entry, each time a new history entry is added.\n\
2215If set to \"unlimited\", this lookbehind is unbounded.\n\
2216Only history entries added during this session are considered for removal.\n\
2217If set to 0, removal of duplicate history entries is disabled.\n\
2218By default this option is set to 0."),
2224Set the filename in which to record the command history."), _(
"\
2225Show the filename in which to record the command history."), _(
"\
2226(the list of previous commands of which a record is kept)."),
2232Set whether to confirm potentially dangerous operations."), _(
"\
2233Show whether to confirm potentially dangerous operations."), NULL,
2239Set annotation_level."), _(
"\
2240Show annotation_level."), _(
"\
22410 == normal; 1 == fullname (for use when running under emacs)\n\
22422 == output annotated suitably for use by programs that control GDB."),
2249Set notification of completion for asynchronous execution commands."), _(
"\
2250Show notification of completion for asynchronous execution commands."), _(
"\
2251Use \"on\" to enable the notification, and \"off\" to disable it."),
2258 _(
"Show GDB's data directory."),
2260When set, GDB uses the specified path to search for data files."),
2269Set whether GDB's standard input is a terminal."), _(
"\
2270Show whether GDB's standard input is a terminal."), _(
"\
2271If on, GDB assumes that standard input is a terminal. In practice, it\n\
2272means that GDB should wait for the user to answer queries associated to\n\
2273commands entered at the command prompt. If off, GDB assumes that standard\n\
2274input is not a terminal, and uses the default answer to all queries.\n\
2275If auto (the default), determine which mode to use based on the standard\n\
2283Set whether GDB should start up quietly."), _(
" \
2284Show whether GDB should start up quietly."), _(
"\
2285This setting will not affect the current session. Instead this command\n\
2286should be added to the .gdbearlyinit file in the users home directory to\n\
2287affect future GDB sessions."),
2294 int vmajor = 0, vminor = 0, vrevision = 0;
2295 sscanf (
version,
"%d.%d.%d", &vmajor, &vminor, &vrevision);
2313 make_final_cleanup (do_chdir_cleanup, xstrdup (current_directory));
2352 const char *tmpenv = getenv (
"GDBHISTFILE");
2353 if (tmpenv !=
nullptr)
2362 const char *fname =
"_gdb_history";
2364 const char *fname =
".gdb_history";
void initialize_current_architecture(void)
void bpstat_clear_actions(void)
ui_file_style style() const
int m_already_prompted_orig
DISABLE_COPY_AND_ASSIGN(gdb_readline_wrapper_cleanup)
~gdb_readline_wrapper_cleanup()
void(* m_handler_orig)(gdb::unique_xmalloc_ptr< char > &&)
int m_target_is_async_orig
gdb_readline_wrapper_cleanup()
scoped_restore_tmpl< struct ui * > m_save_ui
const char * c_str() const
virtual void puts(const char *str)
struct cmd_list_element * showlist
struct cmd_list_element * showhistlist
struct cmd_list_element * cmdlist
struct cmd_list_element * setlist
int is_complete_command(struct cmd_list_element *c)
struct cmd_list_element * sethistlist
void quit_command(const char *args, int from_tty)
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)
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)
void deprecated_cmd_warning(const char *text, struct cmd_list_element *list)
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)
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)
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)
void cmd_func(struct cmd_list_element *cmd, const char *args, int from_tty)
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)
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)
void cli_display_match_list(char **matches, int len, int max)
void execute_cmd_pre_hook(struct cmd_list_element *c)
void print_command_trace(const char *fmt,...)
void execute_cmd_post_hook(struct cmd_list_element *c)
void execute_user_command(struct cmd_list_element *c, const char *args)
void do_show_command(const char *arg, int from_tty, struct cmd_list_element *c)
void do_set_command(const char *arg, int from_tty, struct cmd_list_element *c)
cli_style_option file_name_style
cli_style_option version_style
#define CMD_LIST_AMBIGUOUS
char ** gdb_rl_attempted_completion_function(const char *text, int start, int end)
char * gdb_completion_word_break_characters()
const char * get_gdb_completer_quote_characters(void)
void set_rl_completer_word_break_characters(const char *break_chars)
#define JIT_READER_DIR_RELOCATABLE
#define PYTHON_LIBDIR_RELOCATABLE
#define SYSTEM_GDBINIT_RELOCATABLE
#define TARGET_SYSTEM_ROOT_RELOCATABLE
#define SYSTEM_GDBINIT_DIR_RELOCATABLE
#define WITH_PYTHON_LIBDIR
#define GDB_DATADIR_RELOCATABLE
#define TARGET_SYSTEM_ROOT
#define DEBUGDIR_RELOCATABLE
#define PYTHON_PATH_RELOCATABLE
#define AUTO_LOAD_SAFE_PATH
#define SYSTEM_GDBINIT_DIR
int check_quit_flag(void)
void initialize_inferiors(void)
void initialize_progspace(void)
volatile bool sync_quit_force_run
LONGEST parse_and_eval_long(const char *exp)
void gdb_rl_deprep_term_function(void)
void display_gdb_prompt(const char *new_prompt)
void(* after_char_processing_hook)(void)
void command_handler(const char *command)
const char * handle_line_of_input(std::string &cmd_line_buffer, const char *rl, int repeat, const char *annotation_suffix)
void gdb_rl_callback_handler_remove(void)
int interruptible_select(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout)
void gdb_init_signals(void)
void gdb_disable_readline(void)
void change_line_handler(int editing)
void exception_print(struct ui_file *file, const struct gdb_exception &e)
frame_info_ptr deprecated_safe_get_selected_frame(void)
enum language get_frame_language(frame_info_ptr frame)
struct thread_info * inferior_thread(void)
void switch_to_thread(struct thread_info *thr)
struct thread_info * any_thread_of_inferior(inferior *inf)
int have_live_inferiors(void)
all_inferiors_range all_inferiors(process_stratum_target *proc_target=nullptr)
void initialize_stdin_serial(void)
void set_initial_gdb_ttystate(void)
const char lang_frame_mismatch_warn[]
static void set_language(const char *language)
const struct language_defn * current_language
const struct language_defn * expected_language
const char * default_word_break_characters(void)
void set_gdb_data_directory(const char *new_datadir)
int return_child_result_value
struct ui_file * gdb_stdtarg
struct ui_file * gdb_stdtargerr
observable gdb_datadir_changed
observable< int > gdb_exiting
unsigned int doc_allocated
gdb::optional< setting > var
std::string prefixname() const
struct cmd_list_element ** subcommands
counted_command_line user_commands
unsigned int deprecated_warn_user
bool is_command_class_help() const
__extension__ enum cmd_types type
unsigned int allow_unknown
enum command_class theclass
enum language la_language
struct ui_file * m_gdb_stdin
struct ui_file * m_gdb_stdlog
void(* input_handler)(gdb::unique_xmalloc_ptr< char > &&)
struct ui_file * m_gdb_stdout
enum prompt_state prompt_state
struct ui_file * m_gdb_stderr
bool input_interactive_p() const
struct ui_out * m_current_uiout
int secondary_prompt_depth
void target_dcache_invalidate(void)
void target_log_command(const char *p)
void target_async(bool enable)
void target_detach(inferior *inf, int from_tty)
bool target_has_execution(inferior *inf)
std::string target_pid_to_str(ptid_t ptid)
static void show_write_history_p(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
struct ui_file ** current_ui_gdb_stdout_ptr()
static void show_startup_quiet(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
void(* deprecated_readline_end_hook)(void)
static bool command_editing_p
void print_gdb_version(struct ui_file *stream, bool interactive)
void wait_sync_command_done(void)
static void show_history_remove_duplicates(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static int operate_saved_history
static void gdb_readline_wrapper_line(gdb::unique_xmalloc_ptr< char > &&line)
int(* deprecated_query_hook)(const char *, va_list)
static void kill_or_detach(inferior *inf, int from_tty)
char * gdb_readline_wrapper(const char *prompt)
static gdb::unique_xmalloc_ptr< char > gdb_readline_no_editing(const char *prompt)
static void show_exec_done_display_p(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
scoped_restore_tmpl< int > prevent_dont_repeat(void)
void quit_force(int *exit_arg, int from_tty)
void execute_command_to_string(std::string &res, const char *p, int from_tty, bool term_out)
static void undo_terminal_modifications_before_exit(void)
static void set_gdb_datadir(const char *args, int from_tty, struct cmd_list_element *c)
static void dont_repeat_command(const char *ignored, int from_tty)
void unbuffer_stream(FILE *stream)
void(* deprecated_print_frame_info_listing_hook)(struct symtab *s, int line, int stopline, int noerror)
static void show_history_size(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static void gdb_safe_append_history(void)
void print_gdb_configuration(struct ui_file *stream)
static bool startup_quiet
static void print_inferior_quit_action(inferior *inf, ui_file *out)
char *(* deprecated_readline_hook)(const char *)
void(* deprecated_detach_hook)(void)
void show_commands(const char *args, int from_tty)
static int history_remove_duplicates
void set_prompt(const char *s)
struct ui_file ** current_ui_gdb_stdin_ptr()
static int gdb_readline_wrapper_done
void(* deprecated_attach_hook)(void)
void execute_fn_to_ui_file(struct ui_file *file, std::function< void(void)> fn)
static std::string staged_gdb_datadir
static void set_editing(const char *args, int from_tty, struct cmd_list_element *c)
const std::string & get_prompt()
void execute_fn_to_string(std::string &res, std::function< void(void)> fn, bool term_out)
int gdb_in_secondary_prompt_p(struct ui *ui)
void read_command_file(FILE *stream)
static void set_history_filename(const char *args, int from_tty, struct cmd_list_element *c)
void(* deprecated_warning_hook)(const char *, va_list)
void maybe_wait_sync_command_done(int was_sync)
static std::string history_filename
void save_command_line(const char *cmd)
void(* deprecated_call_command_hook)(struct cmd_list_element *c, const char *cmd, int from_tty)
struct ui_file ** current_ui_gdb_stderr_ptr()
void set_verbose(const char *args, int from_tty, struct cmd_list_element *c)
static const char * previous_repeat_arguments
static bool write_history_p
const char * repeat_previous()
static void show_annotation_level(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static char * previous_saved_command_line
void execute_command_to_ui_file(struct ui_file *file, const char *p, int from_tty)
static void show_prompt(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
const char * command_line_input(std::string &cmd_line_buffer, const char *prompt_arg, const char *annotation_suffix)
auto_boolean interactive_mode
struct ui_file ** current_ui_gdb_stdlog_ptr()
static std::string top_prompt
static int gdb_rl_operate_and_get_next(int count, int key)
static void show_editing(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static void set_history_size_command(const char *args, int from_tty, struct cmd_list_element *c)
static void(* saved_after_char_processing_hook)(void)
static const char * repeat_arguments
void initialize_all_files(void)
void(* deprecated_context_hook)(int id)
static int suppress_dont_repeat
void gdb_add_history(const char *command)
char * get_saved_command_line()
static void gdb_rl_operate_and_get_next_completion(void)
int(* deprecated_ui_loop_hook)(int)
std::string source_file_name
scoped_value_mark prepare_execute_command()
static char * saved_command_line
static void show_gdb_datadir(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
void execute_command(const char *p, int from_tty)
struct ui_out ** current_ui_current_uiout_ptr()
static void show_confirm(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
void check_frame_language_change(void)
static void show_history_filename(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static char * gdb_readline_wrapper_result
static void init_main(void)
void set_repeat_arguments(const char *args)
static void set_readline_history_size(int history_size)
static void show_interactive_mode(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
void(* deprecated_readline_begin_hook)(const char *,...)
static int history_size_setshow_var
void disconnect_tracing(void)
void tui_inject_newline_into_command_window()
static styled_string_s * styled_string(const ui_file_style &style, const char *str, styled_string_s &&tmp={})
static ui_range all_uis()
void init_page_info(void)
int query(const char *ctlstr,...)
void gdb_printf(struct ui_file *stream, const char *format,...)
void gdb_flush(struct ui_file *stream)
void printf_unfiltered(const char *format,...)
struct internalvar * create_internalvar(const char *name)
void set_internalvar_integer(struct internalvar *var, LONGEST l)