GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Macros | Functions | Variables
top.c File Reference
#include "defs.h"
#include "gdbcmd.h"
#include "cli/cli-cmds.h"
#include "cli/cli-script.h"
#include "cli/cli-setshow.h"
#include "cli/cli-decode.h"
#include "symtab.h"
#include "inferior.h"
#include "infrun.h"
#include <signal.h>
#include "target.h"
#include "target-dcache.h"
#include "breakpoint.h"
#include "gdbtypes.h"
#include "expression.h"
#include "value.h"
#include "language.h"
#include "terminal.h"
#include "gdbsupport/job-control.h"
#include "annotate.h"
#include "completer.h"
#include "top.h"
#include "ui.h"
#include "gdbsupport/version.h"
#include "serial.h"
#include "main.h"
#include "gdbsupport/event-loop.h"
#include "gdbthread.h"
#include "extension.h"
#include "interps.h"
#include "observable.h"
#include "maint.h"
#include "filenames.h"
#include "frame.h"
#include "gdbsupport/gdb_select.h"
#include "gdbsupport/scope-exit.h"
#include "gdbarch.h"
#include "gdbsupport/pathstuff.h"
#include "cli/cli-style.h"
#include "pager.h"
#include "readline/readline.h"
#include "readline/history.h"
#include <sys/types.h>
#include "event-top.h"
#include <sys/stat.h>
#include <ctype.h>
#include "ui-out.h"
#include "cli-out.h"
#include "tracepoint.h"
#include "inf-loop.h"

Go to the source code of this file.

Classes

class  gdb_readline_wrapper_cleanup
 

Macros

#define O_NOCTTY   0
 
#define PROMPT(X)   the_prompts.prompt_stack[the_prompts.top + X].prompt
 
#define PREFIX(X)   the_prompts.prompt_stack[the_prompts.top + X].prefix
 
#define SUFFIX(X)   the_prompts.prompt_stack[the_prompts.top + X].suffix
 
#define DEFAULT_PROMPT   "(gdb) "
 
#define Hist_print   10
 

Functions

void initialize_all_files (void)
 
struct ui_file ** current_ui_gdb_stdout_ptr ()
 
struct ui_file ** current_ui_gdb_stdin_ptr ()
 
struct ui_file ** current_ui_gdb_stderr_ptr ()
 
struct ui_file ** current_ui_gdb_stdlog_ptr ()
 
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 unbuffer_stream (FILE *stream)
 
void read_command_file (FILE *stream)
 
scoped_value_mark prepare_execute_command ()
 
void check_frame_language_change (void)
 
void wait_sync_command_done (void)
 
void maybe_wait_sync_command_done (int was_sync)
 
void set_repeat_arguments (const char *args)
 
void execute_command (const char *p, int from_tty)
 
void execute_fn_to_ui_file (struct ui_file *file, std::function< void(void)> fn)
 
void execute_fn_to_string (std::string &res, std::function< void(void)> fn, bool term_out)
 
void execute_command_to_ui_file (struct ui_file *file, const char *p, int from_tty)
 
void execute_command_to_string (std::string &res, const char *p, int from_tty, bool term_out)
 
void execute_command_to_string (const char *p, int from_tty, bool term_out)
 
void dont_repeat (void)
 
const char * repeat_previous ()
 
scoped_restore_tmpl< int > prevent_dont_repeat (void)
 
char * get_saved_command_line ()
 
void save_command_line (const char *cmd)
 
static gdb::unique_xmalloc_ptr< char > gdb_readline_no_editing (const char *prompt)
 
static void show_write_history_p (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void show_history_size (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void show_history_remove_duplicates (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void show_history_filename (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
int gdb_in_secondary_prompt_p (struct ui *ui)
 
static void gdb_readline_wrapper_line (gdb::unique_xmalloc_ptr< char > &&line)
 
char * gdb_readline_wrapper (const char *prompt)
 
static void gdb_rl_operate_and_get_next_completion (void)
 
static int gdb_rl_operate_and_get_next (int count, int key)
 
void gdb_add_history (const char *command)
 
static void gdb_safe_append_history (void)
 
const char * command_line_input (std::string &cmd_line_buffer, const char *prompt_arg, const char *annotation_suffix)
 
void print_gdb_version (struct ui_file *stream, bool interactive)
 
void print_gdb_configuration (struct ui_file *stream)
 
const std::string & get_prompt ()
 
void set_prompt (const char *s)
 
static void kill_or_detach (inferior *inf, int from_tty)
 
static void print_inferior_quit_action (inferior *inf, ui_file *out)
 
int quit_confirm (void)
 
static void undo_terminal_modifications_before_exit (void)
 
void quit_force (int *exit_arg, int from_tty)
 
static void show_interactive_mode (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void dont_repeat_command (const char *ignored, int from_tty)
 
void show_commands (const char *args, int from_tty)
 
static void set_readline_history_size (int history_size)
 
static void set_history_size_command (const char *args, int from_tty, struct cmd_list_element *c)
 
void set_verbose (const char *args, int from_tty, struct cmd_list_element *c)
 
void init_history (void)
 
static void show_prompt (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void set_editing (const char *args, int from_tty, struct cmd_list_element *c)
 
static void show_editing (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void show_annotation_level (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void show_exec_done_display_p (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void set_gdb_datadir (const char *args, int from_tty, struct cmd_list_element *c)
 
static void show_gdb_datadir (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void set_history_filename (const char *args, int from_tty, struct cmd_list_element *c)
 
bool check_quiet_mode ()
 
static void show_startup_quiet (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void init_main (void)
 
void gdb_init ()
 
void _initialize_top ()
 

Variables

int inhibit_gdbinit = 0
 
bool confirm = true
 
static char * saved_command_line
 
static const char * repeat_arguments
 
static char * previous_saved_command_line
 
static const char * previous_repeat_arguments
 
bool server_command
 
int remote_timeout = 2
 
int(* deprecated_ui_loop_hook )(int)
 
void(* deprecated_print_frame_info_listing_hook )(struct symtab *s, int line, int stopline, int noerror)
 
int(* deprecated_query_hook )(const char *, va_list)
 
void(* deprecated_warning_hook )(const char *, va_list)
 
void(* deprecated_readline_begin_hook )(const char *,...)
 
char *(* deprecated_readline_hook )(const char *)
 
void(* deprecated_readline_end_hook )(void)
 
void(* deprecated_attach_hook )(void)
 
void(* deprecated_detach_hook )(void)
 
void(* deprecated_call_command_hook )(struct cmd_list_element *c, const char *cmd, int from_tty)
 
void(* deprecated_context_hook )(int id)
 
int source_line_number
 
std::string source_file_name
 
static int suppress_dont_repeat = 0
 
static bool command_editing_p
 
bool history_expansion_p
 
static bool write_history_p
 
static std::string history_filename
 
static int history_size_setshow_var = -2
 
static int history_remove_duplicates = 0
 
static int gdb_readline_wrapper_done
 
static char * gdb_readline_wrapper_result
 
static void(* saved_after_char_processing_hook )(void)
 
static int operate_saved_history = -1
 
static int command_count = 0
 
static std::string top_prompt
 
auto_boolean interactive_mode = AUTO_BOOLEAN_AUTO
 
bool info_verbose = false
 
static std::string staged_gdb_datadir
 
static bool startup_quiet
 

Macro Definition Documentation

◆ DEFAULT_PROMPT

#define DEFAULT_PROMPT   "(gdb) "

Definition at line 96 of file top.c.

Referenced by init_main().

◆ Hist_print

#define Hist_print   10

Definition at line 1859 of file top.c.

Referenced by show_commands().

◆ O_NOCTTY

#define O_NOCTTY   0

Definition at line 84 of file top.c.

◆ PREFIX

#define PREFIX ( X)    the_prompts.prompt_stack[the_prompts.top + X].prefix

Definition at line 90 of file top.c.

◆ PROMPT

#define PROMPT ( X)    the_prompts.prompt_stack[the_prompts.top + X].prompt

Definition at line 89 of file top.c.

◆ SUFFIX

#define SUFFIX ( X)    the_prompts.prompt_stack[the_prompts.top + X].suffix

Definition at line 91 of file top.c.

Function Documentation

◆ _initialize_top()

void _initialize_top ( )

Definition at line 2349 of file top.c.

Referenced by initialize_all_files().

◆ check_frame_language_change()

void check_frame_language_change ( void )

◆ check_quiet_mode()

bool check_quiet_mode ( )

Definition at line 2122 of file top.c.

References startup_quiet.

Referenced by captured_main_1().

◆ command_line_input()

const char * command_line_input ( std::string & cmd_line_buffer,
const char * prompt_arg,
const char * annotation_suffix )

◆ current_ui_current_uiout_ptr()

struct ui_out ** current_ui_current_uiout_ptr ( void )

Definition at line 124 of file top.c.

References current_ui, and ui::m_current_uiout.

◆ current_ui_gdb_stderr_ptr()

struct ui_file ** current_ui_gdb_stderr_ptr ( void )

Definition at line 112 of file top.c.

References current_ui, and ui::m_gdb_stderr.

◆ current_ui_gdb_stdin_ptr()

struct ui_file ** current_ui_gdb_stdin_ptr ( void )

Definition at line 106 of file top.c.

References current_ui, and ui::m_gdb_stdin.

◆ current_ui_gdb_stdlog_ptr()

struct ui_file ** current_ui_gdb_stdlog_ptr ( void )

Definition at line 118 of file top.c.

References current_ui, and ui::m_gdb_stdlog.

◆ current_ui_gdb_stdout_ptr()

struct ui_file ** current_ui_gdb_stdout_ptr ( void )

Definition at line 100 of file top.c.

References current_ui, and ui::m_gdb_stdout.

◆ dont_repeat()

void dont_repeat ( void )

◆ dont_repeat_command()

static void dont_repeat_command ( const char * ignored,
int from_tty )
static

Definition at line 1849 of file top.c.

References saved_command_line.

Referenced by init_main().

◆ execute_command()

void execute_command ( const char * p,
int from_tty )

Definition at line 459 of file top.c.

References all_commands, cmd_list_element::allow_unknown, bpstat_clear_actions(), check_frame_language_change(), class_user, cmd_func(), cmdlist, current_ui, cmd_list_element::default_args, deprecated_call_command_hook, deprecated_cmd_warning(), cmd_list_element::deprecated_warn_user, do_set_command(), do_show_command(), execute_cmd_post_hook(), execute_cmd_pre_hook(), execute_user_command(), gdb_printf(), gdb_stdout, has_stack_frames(), help_list(), inferior_thread(), cmd_list_element::is_command_class_help(), is_complete_command(), cmd_list_element::is_prefix(), lookup_cmd(), maybe_wait_sync_command_done(), nullptr, cmd_list_element::prefixname(), prepare_execute_command(), print_command_trace(), PROMPT_BLOCKED, ui::prompt_state, repeat_arguments, saved_command_line, set_cmd, show_cmd, cmd_list_element::subcommands, target_log_command(), cmd_list_element::theclass, THREAD_RUNNING, cmd_list_element::type, and cmd_list_element::user_commands.

Referenced by cmd_record_btrace_bts_start(), cmd_record_btrace_pt_start(), cmd_record_btrace_start(), cmd_record_full_start(), cmd_record_start(), command_handler(), command_line_handler(), env_execute_cli_command(), eval_command(), cli_interp::exec(), exec_reverse_once(), execute_cmdargs(), execute_command_to_string(), execute_command_to_string(), execute_command_to_ui_file(), execute_control_command_1(), faas_command(), mi_execute_async_cli_command(), mi_execute_cli_command(), nto_init_solib_absolute_prefix(), taas_command(), tfaas_command(), tui_update_command(), and with_command_1().

◆ execute_command_to_string() [1/2]

void execute_command_to_string ( const char * p,
int from_tty,
bool term_out )

Definition at line 680 of file top.c.

References dummy, execute_command(), and execute_fn_to_string().

◆ execute_command_to_string() [2/2]

void execute_command_to_string ( std::string & res,
const char * p,
int from_tty,
bool term_out )

◆ execute_command_to_ui_file()

void execute_command_to_ui_file ( struct ui_file * file,
const char * p,
int from_tty )

Definition at line 661 of file top.c.

References execute_command(), and execute_fn_to_ui_file().

Referenced by pipe_command().

◆ execute_fn_to_string()

void execute_fn_to_string ( std::string & res,
std::function< void(void)> fn,
bool term_out )

◆ execute_fn_to_ui_file()

void execute_fn_to_ui_file ( struct ui_file * file,
std::function< void(void)> fn )

◆ gdb_add_history()

void gdb_add_history ( const char * command)

Definition at line 1120 of file top.c.

References command_count, and history_remove_duplicates.

Referenced by handle_line_of_input().

◆ gdb_in_secondary_prompt_p()

int gdb_in_secondary_prompt_p ( struct ui * ui)

◆ gdb_init()

void gdb_init ( )

◆ gdb_readline_no_editing()

static gdb::unique_xmalloc_ptr< char > gdb_readline_no_editing ( const char * prompt)
static

◆ gdb_readline_wrapper()

char * gdb_readline_wrapper ( const char * prompt)

◆ gdb_readline_wrapper_line()

static void gdb_readline_wrapper_line ( gdb::unique_xmalloc_ptr< char > && line)
static

◆ gdb_rl_operate_and_get_next()

static int gdb_rl_operate_and_get_next ( int count,
int key )
static

◆ gdb_rl_operate_and_get_next_completion()

static void gdb_rl_operate_and_get_next_completion ( void )
static

Definition at line 1073 of file top.c.

References after_char_processing_hook, and operate_saved_history.

Referenced by gdb_rl_operate_and_get_next().

◆ gdb_safe_append_history()

static void gdb_safe_append_history ( void )
static

Definition at line 1165 of file top.c.

References command_count, file_name_style, history_filename, cli_style_option::style(), and styled_string().

Referenced by quit_force().

◆ get_prompt()

const std::string & get_prompt ( )

Definition at line 1627 of file top.c.

References top_prompt.

Referenced by top_level_prompt().

◆ get_saved_command_line()

char * get_saved_command_line ( )

Definition at line 743 of file top.c.

References saved_command_line.

Referenced by handle_line_of_input(), and repeat_previous().

◆ init_history()

void init_history ( void )

◆ init_main()

static void init_main ( void )
static

◆ initialize_all_files()

void initialize_all_files ( void )
extern

Definition at line 187 of file init.c.

References _initialize_ada_exp, _initialize_ada_language, _initialize_addrmap, _initialize_agent, _initialize_amd64_linux_nat, _initialize_amd64_linux_tdep, _initialize_amd64_tdep, _initialize_annotate, _initialize_auto_load, _initialize_auxv, _initialize_ax_gdb, _initialize_break_catch_exec, _initialize_break_catch_fork, _initialize_break_catch_load, _initialize_break_catch_sig, _initialize_break_catch_syscall, _initialize_break_catch_throw, _initialize_breakpoint, _initialize_btrace, _initialize_charset, _initialize_cli_cmds, _initialize_cli_dump, _initialize_cli_interp, _initialize_cli_logging, _initialize_cli_script, _initialize_cli_style, _initialize_coff_pe_read, _initialize_coffread, _initialize_compile, _initialize_compile_cplus_types, _initialize_complaints, _initialize_completer, _initialize_cooked_index, _initialize_copying, _initialize_core, _initialize_corelow, _initialize_cp_abi, _initialize_cp_namespace, _initialize_cp_support, _initialize_cp_valprint, _initialize_ctf, _initialize_dbxread, _initialize_dcache, _initialize_debuginfod, _initialize_disasm, _initialize_displaced_stepping, _initialize_dtrace_probe, _initialize_dummy_frame, _initialize_dwarf2_frame, _initialize_dwarf2_read, _initialize_dwarf2loc, _initialize_dwarf_index_write, _initialize_elfread, _initialize_event_top, _initialize_exec, _initialize_extension, _initialize_f_language, _initialize_f_valprint, _initialize_filesystem, _initialize_findvar, _initialize_fork_child, _initialize_frame, _initialize_frame_reg, _initialize_frame_unwind, _initialize_gcore, _initialize_gdb_bfd, _initialize_gdb_demangle, _initialize_gdb_osabi, _initialize_gdbarch_utils, _initialize_gdbtypes, _initialize_gmp_utils, _initialize_gnu_v2_abi, _initialize_gnu_v3_abi, _initialize_guile, _initialize_i386_linux_tdep, _initialize_i386_tdep, _initialize_index_cache, _initialize_infcall, _initialize_infcmd, _initialize_inflow, _initialize_infrun, _initialize_interpreter, _initialize_jit, _initialize_language, _initialize_linux_fork, _initialize_linux_nat, _initialize_linux_tdep, _initialize_macrocmd, _initialize_macroscope, _initialize_maint_cmds, _initialize_maint_test_options, _initialize_maint_test_settings, _initialize_mdebugread, _initialize_mem, _initialize_mem_search, _initialize_mi_cmd_env, _initialize_mi_cmds, _initialize_mi_interp, _initialize_mi_main, _initialize_mipsread, _initialize_notif, _initialize_objc_language, _initialize_observer, _initialize_osdata, _initialize_parse, _initialize_pascal_valprint, _initialize_printcmd, _initialize_probe, _initialize_proc_service, _initialize_producer, _initialize_psymtab, _initialize_py_breakpoint, _initialize_py_connection, _initialize_py_interp, _initialize_py_micmd, _initialize_py_unwind, _initialize_python, _initialize_ravenscar, _initialize_read_gdb_index, _initialize_record, _initialize_record_btrace, _initialize_record_full, _initialize_regcache, _initialize_regcache_dump, _initialize_reggroup, _initialize_remote, _initialize_reverse, _initialize_run_on_main_thread, _initialize_rust_exp, _initialize_ser_hardwire, _initialize_ser_pipe, _initialize_ser_socket, _initialize_ser_tcp, _initialize_serial, _initialize_solib, _initialize_source, _initialize_source_cache, _initialize_stabsread, _initialize_stack, _initialize_stap_probe, _initialize_step_skip, _initialize_svr4_solib, _initialize_symfile, _initialize_symfile_debug, _initialize_symfile_mem, _initialize_symmisc, _initialize_symtab, _initialize_tailcall_frame, _initialize_target, _initialize_target_connection, _initialize_target_dcache, _initialize_target_descriptions, _initialize_tasks, _initialize_thread, _initialize_thread_db, _initialize_top, _initialize_tracefile, _initialize_tracefile_tfile, _initialize_tracepoint, _initialize_tui, _initialize_tui_disasm, _initialize_tui_hooks, _initialize_tui_interp, _initialize_tui_layout, _initialize_tui_regs, _initialize_tui_stack, _initialize_tui_win, _initialize_typeprint, _initialize_ui, _initialize_ui_style, _initialize_user_regs, _initialize_utils, _initialize_valops, _initialize_valprint, _initialize_values, _initialize_varobj, _initialize_x86_linux_nat, and _initialize_xml_support.

Referenced by gdb_init().

◆ kill_or_detach()

static void kill_or_detach ( inferior * inf,
int from_tty )
static

◆ maybe_wait_sync_command_done()

void maybe_wait_sync_command_done ( int was_sync)

◆ prepare_execute_command()

scoped_value_mark prepare_execute_command ( void )

Definition at line 356 of file top.c.

References non_stop, and target_dcache_invalidate().

Referenced by execute_command(), and mi_cmd_execute().

◆ prevent_dont_repeat()

scoped_restore_tmpl< int > prevent_dont_repeat ( void )

Definition at line 735 of file top.c.

References suppress_dont_repeat.

Referenced by bpstat_do_actions_1().

◆ print_gdb_configuration()

void print_gdb_configuration ( struct ui_file * stream)

◆ print_gdb_version()

void print_gdb_version ( struct ui_file * stream,
bool interactive )

◆ print_inferior_quit_action()

static void print_inferior_quit_action ( inferior * inf,
ui_file * out )
static

Definition at line 1670 of file top.c.

References gdb_printf(), inf::pid, and target_pid_to_str().

Referenced by quit_confirm().

◆ quit_confirm()

int quit_confirm ( void )

◆ quit_force()

void quit_force ( int * exit_arg,
int from_tty )

◆ read_command_file()

void read_command_file ( FILE * stream)

Definition at line 322 of file top.c.

References command_handler(), command_line_input(), current_ui, ui::instream, and unbuffer_stream().

Referenced by script_from_file().

◆ repeat_previous()

const char * repeat_previous ( )

◆ save_command_line()

void save_command_line ( const char * cmd)

◆ set_editing()

static void set_editing ( const char * args,
int from_tty,
struct cmd_list_element * c )
static

Definition at line 2035 of file top.c.

References change_line_handler(), ui::command_editing, current_ui, and set_editing_cmd_var.

Referenced by init_main().

◆ set_gdb_datadir()

static void set_gdb_datadir ( const char * args,
int from_tty,
struct cmd_list_element * c )
static

◆ set_history_filename()

static void set_history_filename ( const char * args,
int from_tty,
struct cmd_list_element * c )
static

Definition at line 2104 of file top.c.

References history_filename.

Referenced by init_main().

◆ set_history_size_command()

static void set_history_size_command ( const char * args,
int from_tty,
struct cmd_list_element * c )
static

Definition at line 1935 of file top.c.

References history_size_setshow_var, and set_readline_history_size().

Referenced by init_main().

◆ set_prompt()

void set_prompt ( const char * s)

Definition at line 1635 of file top.c.

References top_prompt.

Referenced by init_main().

◆ set_readline_history_size()

static void set_readline_history_size ( int history_size)
static

Definition at line 1923 of file top.c.

Referenced by init_history(), and set_history_size_command().

◆ set_repeat_arguments()

void set_repeat_arguments ( const char * args)

Definition at line 450 of file top.c.

References repeat_arguments.

Referenced by list_command(), show_commands(), show_values(), and x_command().

◆ set_verbose()

void set_verbose ( const char * args,
int from_tty,
struct cmd_list_element * c )

◆ show_annotation_level()

static void show_annotation_level ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

Definition at line 2053 of file top.c.

References gdb_printf().

Referenced by init_main().

◆ show_commands()

void show_commands ( const char * args,
int from_tty )

Definition at line 1861 of file top.c.

References gdb_printf(), Hist_print, ui::num, parse_and_eval_long(), and set_repeat_arguments().

◆ show_confirm()

static void show_confirm ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

Definition at line 137 of file top.c.

References gdb_printf().

Referenced by init_main().

◆ show_editing()

static void show_editing ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

Definition at line 2044 of file top.c.

References ui::command_editing, current_ui, and gdb_printf().

Referenced by init_main().

◆ show_exec_done_display_p()

static void show_exec_done_display_p ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

Definition at line 2060 of file top.c.

References gdb_printf().

Referenced by init_main().

◆ show_gdb_datadir()

static void show_gdb_datadir ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

Definition at line 2093 of file top.c.

References file_name_style, gdb_datadir, gdb_printf(), cli_style_option::style(), and styled_string().

Referenced by init_main().

◆ show_history_filename()

static void show_history_filename ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

Definition at line 895 of file top.c.

References file_name_style, gdb_printf(), history_filename, cli_style_option::style(), and styled_string().

Referenced by init_main().

◆ show_history_remove_duplicates()

static void show_history_remove_duplicates ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

Definition at line 884 of file top.c.

References gdb_printf().

Referenced by init_main().

◆ show_history_size()

static void show_history_size ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

Definition at line 872 of file top.c.

References gdb_printf().

Referenced by init_main().

◆ show_interactive_mode()

static void show_interactive_mode ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

Definition at line 1836 of file top.c.

References AUTO_BOOLEAN_AUTO, current_ui, gdb_printf(), ui::input_interactive_p(), and interactive_mode.

Referenced by init_main().

◆ show_prompt()

static void show_prompt ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

Definition at line 2026 of file top.c.

References gdb_printf().

Referenced by init_main().

◆ show_startup_quiet()

static void show_startup_quiet ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

Definition at line 2130 of file top.c.

References gdb_printf().

Referenced by init_main().

◆ show_write_history_p()

static void show_write_history_p ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

Definition at line 856 of file top.c.

References gdb_printf(), history_filename, and write_history_p.

Referenced by init_main().

◆ unbuffer_stream()

void unbuffer_stream ( FILE * stream)

Definition at line 261 of file top.c.

References ISATTY.

Referenced by read_command_file(), and ui::ui().

◆ undo_terminal_modifications_before_exit()

static void undo_terminal_modifications_before_exit ( void )
static

Definition at line 1712 of file top.c.

References current_ui, gdb_disable_readline(), main_ui, target_terminal::ours(), and tui_disable().

Referenced by quit_force().

◆ wait_sync_command_done()

void wait_sync_command_done ( void )

Definition at line 414 of file top.c.

References current_ui, enable, PROMPT_BLOCKED, and ui::prompt_state.

Referenced by maybe_wait_sync_command_done(), and run_inferior_call().

Variable Documentation

◆ command_count

int command_count = 0
static

Definition at line 1115 of file top.c.

Referenced by gdb_add_history(), and gdb_safe_append_history().

◆ command_editing_p

bool command_editing_p
static

Definition at line 837 of file top.c.

Referenced by command_line_input(), and init_main().

◆ confirm

bool confirm = true

Definition at line 134 of file top.c.

Referenced by ATTRIBUTE_PRINTF(), ATTRIBUTE_PRINTF(), and init_main().

◆ deprecated_attach_hook

void(* deprecated_attach_hook) (void) ( void )

Definition at line 245 of file top.c.

Referenced by attach_post_wait().

◆ deprecated_call_command_hook

void(* deprecated_call_command_hook) (struct cmd_list_element *c, const char *cmd, int from_tty) ( struct cmd_list_element * c,
const char * cmd,
int from_tty )

Definition at line 251 of file top.c.

Referenced by clear_interpreter_hooks(), and execute_command().

◆ deprecated_context_hook

void(* deprecated_context_hook) (int id) ( int id)

Definition at line 256 of file top.c.

Referenced by clear_interpreter_hooks(), and handle_signal_stop().

◆ deprecated_detach_hook

void(* deprecated_detach_hook) (void) ( void )

Definition at line 246 of file top.c.

Referenced by detach_command(), disconnect_command(), and generic_mourn_inferior().

◆ deprecated_print_frame_info_listing_hook

void(* deprecated_print_frame_info_listing_hook) (struct symtab *s, int line, int stopline, int noerror) ( struct symtab * s,
int line,
int stopline,
int noerror )

◆ deprecated_query_hook

int(* deprecated_query_hook) (const char *, va_list) ( const char * ,
va_list  )

◆ deprecated_readline_begin_hook

void(* deprecated_readline_begin_hook) (const char *,...) ( const char * ,
... )

Definition at line 238 of file top.c.

Referenced by clear_interpreter_hooks(), and read_command_lines().

◆ deprecated_readline_end_hook

void(* deprecated_readline_end_hook) (void) ( void )

Definition at line 240 of file top.c.

Referenced by clear_interpreter_hooks(), and read_command_lines().

◆ deprecated_readline_hook

char *(* deprecated_readline_hook) (const char *) ( const char * )

Definition at line 239 of file top.c.

Referenced by clear_interpreter_hooks(), command_line_input(), and read_next_line().

◆ deprecated_ui_loop_hook

int(* deprecated_ui_loop_hook) (int) ( int signo)

◆ deprecated_warning_hook

void(* deprecated_warning_hook) (const char *, va_list) ( const char * ,
va_list  )

◆ gdb_readline_wrapper_done

int gdb_readline_wrapper_done
static

◆ gdb_readline_wrapper_result

char* gdb_readline_wrapper_result
static

◆ history_expansion_p

bool history_expansion_p

Definition at line 843 of file top.c.

Referenced by handle_line_of_input(), and init_main().

◆ history_filename

std::string history_filename
static

◆ history_remove_duplicates

int history_remove_duplicates = 0
static

Definition at line 881 of file top.c.

Referenced by gdb_add_history(), and init_main().

◆ history_size_setshow_var

int history_size_setshow_var = -2
static

Definition at line 869 of file top.c.

Referenced by init_history(), init_main(), and set_history_size_command().

◆ info_verbose

bool info_verbose = false

◆ inhibit_gdbinit

int inhibit_gdbinit = 0

Definition at line 129 of file top.c.

Referenced by _initialize_check_for_gdb_ini(), and captured_main_1().

◆ interactive_mode

auto_boolean interactive_mode = AUTO_BOOLEAN_AUTO

Definition at line 1831 of file top.c.

Referenced by init_main(), ui::input_interactive_p(), and show_interactive_mode().

◆ operate_saved_history

int operate_saved_history = -1
static

Definition at line 1068 of file top.c.

Referenced by gdb_rl_operate_and_get_next(), and gdb_rl_operate_and_get_next_completion().

◆ previous_repeat_arguments

const char* previous_repeat_arguments
static

Definition at line 165 of file top.c.

Referenced by repeat_previous(), and save_command_line().

◆ previous_saved_command_line

char* previous_saved_command_line
static

Definition at line 160 of file top.c.

Referenced by gdb_init(), repeat_previous(), and save_command_line().

◆ remote_timeout

int remote_timeout = 2

◆ repeat_arguments

const char* repeat_arguments
static

◆ saved_after_char_processing_hook

void(* saved_after_char_processing_hook) (void) ( void )
static

◆ saved_command_line

char* saved_command_line
static

◆ server_command

bool server_command

Definition at line 173 of file top.c.

Referenced by ATTRIBUTE_PRINTF(), breakpoint_1(), dont_repeat(), and handle_line_of_input().

◆ source_file_name

std::string source_file_name

Definition at line 318 of file top.c.

Referenced by command_line_input(), and script_from_file().

◆ source_line_number

int source_line_number

Definition at line 312 of file top.c.

Referenced by command_line_input(), and script_from_file().

◆ staged_gdb_datadir

std::string staged_gdb_datadir
static

Definition at line 2072 of file top.c.

Referenced by init_main(), and set_gdb_datadir().

◆ startup_quiet

bool startup_quiet
static

Definition at line 2117 of file top.c.

Referenced by check_quiet_mode(), and init_main().

◆ suppress_dont_repeat

int suppress_dont_repeat = 0
static

Definition at line 691 of file top.c.

Referenced by dont_repeat(), and prevent_dont_repeat().

◆ top_prompt

std::string top_prompt
static

Definition at line 1622 of file top.c.

Referenced by get_prompt(), init_main(), and set_prompt().

◆ write_history_p

bool write_history_p
static

Definition at line 848 of file top.c.

Referenced by init_main(), quit_force(), and show_write_history_p().