GDB (xrefs)
|
#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 () |
#define DEFAULT_PROMPT "(gdb) " |
Definition at line 96 of file top.c.
Referenced by init_main().
#define Hist_print 10 |
Definition at line 1859 of file top.c.
Referenced by show_commands().
void _initialize_top | ( | ) |
Definition at line 2349 of file top.c.
Referenced by initialize_all_files().
void check_frame_language_change | ( | void | ) |
Definition at line 372 of file top.c.
References current_language, deprecated_safe_get_selected_frame(), expected_language, gdb_printf(), get_frame_language(), has_stack_frames(), info_verbose, language_defn::la_language, lang_frame_mismatch_warn, language_info(), language_mode_auto, and language_unknown.
Referenced by execute_command(), and inferior_event_handler().
bool check_quiet_mode | ( | ) |
const char * command_line_input | ( | std::string & | cmd_line_buffer, |
const char * | prompt_arg, | ||
const char * | annotation_suffix ) |
Definition at line 1226 of file top.c.
References annotation_level, command_editing_p, current_ui, deprecated_readline_hook, gdb_flush(), gdb_readline_no_editing(), gdb_readline_wrapper(), gdb_stderr, gdb_stdout, handle_line_of_input(), ui::input_interactive_p(), ui::instream, printf_unfiltered(), source_file_name, source_line_number, and ui::stdin_stream.
Referenced by decode_line_2(), gdbpy_readline_wrapper(), get_selections(), read_command_file(), and read_next_line().
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.
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.
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.
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.
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.
void dont_repeat | ( | void | ) |
Definition at line 696 of file top.c.
References current_ui, ui::instream, repeat_arguments, saved_command_line, server_command, ui::stdin_stream, and suppress_dont_repeat.
Referenced by add_symbol_file_command(), agent_eval_command_one(), attach_command(), auto_load_info_scripts(), cd_command(), cmd_record_call_history(), cmd_record_insn_history(), cmdpy_dont_repeat(), complete_command(), core_file_command(), delete_command(), delete_mem_command(), delete_trace_command(), delete_trace_variable_command(), detach_command(), directory_command(), disconnect_command(), display_command(), gdbscm_dont_repeat(), info_line_command(), interrupt_command(), load_command(), maint_agent_command_1(), maint_agent_printf_command(), maint_btrace_packet_history_cmd(), maintenance_info_line_tables(), maintenance_info_symtabs(), maintenance_print_msymbols(), maintenance_print_objfiles(), maintenance_print_psymbols(), maintenance_print_symbols(), mi_cmd_env_dir(), mi_cmd_env_path(), new_ui_command(), path_command(), pager_file::prompt_for_continue(), read_command_lines_1(), recurse_read_control_structure(), remove_symbol_file_command(), repeat_previous(), run_command_1(), save_bookmark_command(), sharedlibrary_command(), signal_command(), symbol_file_command(), target_preopen(), tstart_command(), tui_rl_switch_mode(), and undisplay_command().
|
static |
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().
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().
void execute_command_to_string | ( | std::string & | res, |
const char * | p, | ||
int | from_tty, | ||
bool | term_out ) |
Definition at line 670 of file top.c.
References execute_command(), and execute_fn_to_string().
Referenced by frame_apply_command_count(), record_start(), record_stop(), and thread_try_catch_cmd().
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().
void execute_fn_to_string | ( | std::string & | res, |
std::function< void(void)> | fn, | ||
bool | term_out ) |
Definition at line 638 of file top.c.
References execute_fn_to_ui_file(), and string_file::release().
Referenced by execute_command_to_string(), execute_command_to_string(), and execute_control_commands_to_string().
void execute_fn_to_ui_file | ( | struct ui_file * | file, |
std::function< void(void)> | fn ) |
Definition at line 609 of file top.c.
References ui::async, current_ui, current_uiout, gdb_stderr, gdb_stdlog, gdb_stdout, gdb_stdtarg, and gdb_stdtargerr.
Referenced by execute_command_to_ui_file(), and execute_fn_to_string().
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().
int gdb_in_secondary_prompt_p | ( | struct ui * | ui | ) |
Definition at line 942 of file top.c.
References ui::secondary_prompt_depth.
Referenced by check_curr_ui_sync_execution_done(), tui_inject_newline_into_command_window(), tui_redisplay_readline(), and tui_rl_startup_hook().
void gdb_init | ( | ) |
Definition at line 2303 of file top.c.
References current_language, expected_language, gdb_init_signals(), init_main(), init_page_info(), initialize_all_files(), initialize_current_architecture(), initialize_inferiors(), initialize_progspace(), initialize_stdin_serial(), language_c, previous_saved_command_line, saved_command_line, set_initial_gdb_ttystate(), and set_language().
Referenced by captured_main_1().
|
static |
Definition at line 770 of file top.c.
References current_ui, gdb_flush(), gdb_stdout, ui::instream, interruptible_select(), ui::line_buffer, printf_unfiltered(), and QUIT.
Referenced by command_line_input().
char * gdb_readline_wrapper | ( | const char * | prompt | ) |
Definition at line 1040 of file top.c.
References after_char_processing_hook, ui::command_editing, current_ui, display_gdb_prompt(), gdb_readline_wrapper_done, and gdb_readline_wrapper_result.
Referenced by ATTRIBUTE_PRINTF(), command_line_input(), and pager_file::prompt_for_continue().
|
static |
Definition at line 952 of file top.c.
References after_char_processing_hook, ui::command_editing, current_ui, gdb_readline_wrapper_done, gdb_readline_wrapper_result, gdb_rl_callback_handler_remove(), saved_after_char_processing_hook, tui_active, and tui_inject_newline_into_command_window().
Referenced by gdb_readline_wrapper_cleanup::gdb_readline_wrapper_cleanup(), and gdb_readline_wrapper_cleanup::~gdb_readline_wrapper_cleanup().
|
static |
Definition at line 1094 of file top.c.
References after_char_processing_hook, gdb_rl_operate_and_get_next_completion(), and operate_saved_history.
Referenced by init_main().
|
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().
|
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().
const std::string & get_prompt | ( | ) |
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().
void init_history | ( | void | ) |
Definition at line 1977 of file top.c.
References history_filename, history_size_setshow_var, set_readline_history_size(), and cmd_list_element::var.
Referenced by captured_main_1().
|
static |
Definition at line 2138 of file top.c.
References add_com(), add_setshow_auto_boolean_cmd(), add_setshow_boolean_cmd(), add_setshow_filename_cmd(), add_setshow_optional_filename_cmd(), add_setshow_string_cmd(), add_setshow_zinteger_cmd(), add_setshow_zuinteger_unlimited_cmd(), annotation_level, class_maintenance, class_obscure, class_support, cli_display_match_list(), command_editing_p, confirm, create_internalvar(), DEFAULT_PROMPT, default_word_break_characters(), dont_repeat_command(), exec_done_display_p, gdb_completion_word_break_characters(), gdb_datadir, gdb_rl_attempted_completion_function(), gdb_rl_deprep_term_function(), gdb_rl_operate_and_get_next(), get_gdb_completer_quote_characters(), history_expansion_p, history_filename, history_remove_duplicates, history_size_setshow_var, interactive_mode, no_class, set_editing(), set_editing_cmd_var, set_gdb_datadir(), set_history_filename(), set_history_size_command(), set_internalvar_integer(), set_prompt(), set_rl_completer_word_break_characters(), sethistlist, setlist, show_annotation_level(), show_confirm(), show_editing(), show_exec_done_display_p(), show_gdb_datadir(), show_history_filename(), show_history_remove_duplicates(), show_history_size(), show_interactive_mode(), show_prompt(), show_startup_quiet(), show_write_history_p(), showhistlist, showlist, staged_gdb_datadir, startup_quiet, top_prompt, version, and write_history_p.
Referenced by gdb_init().
|
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().
|
static |
Definition at line 1645 of file top.c.
References any_thread_of_inferior(), inf::pid, switch_to_thread(), target_detach(), target_has_execution(), and target_kill().
Referenced by quit_force().
void maybe_wait_sync_command_done | ( | int | was_sync | ) |
Definition at line 435 of file top.c.
References ui::async, current_ui, PROMPT_BLOCKED, ui::prompt_state, and wait_sync_command_done().
Referenced by catch_command_errors(), and 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().
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().
void print_gdb_configuration | ( | struct ui_file * | stream | ) |
Definition at line 1393 of file top.c.
References AUTO_LOAD_DIR, AUTO_LOAD_SAFE_PATH, DEBUGDIR, DEBUGDIR_RELOCATABLE, GDB_DATADIR, GDB_DATADIR_RELOCATABLE, gdb_printf(), host_name, JIT_READER_DIR, JIT_READER_DIR_RELOCATABLE, PYTHON_LIBDIR_RELOCATABLE, PYTHON_PATH_RELOCATABLE, SYSTEM_GDBINIT, SYSTEM_GDBINIT_DIR, SYSTEM_GDBINIT_DIR_RELOCATABLE, SYSTEM_GDBINIT_RELOCATABLE, target_name, TARGET_SYSTEM_ROOT, TARGET_SYSTEM_ROOT_RELOCATABLE, WITH_PYTHON_LIBDIR, and WITH_PYTHON_PATH.
Referenced by captured_main_1(), and show_configuration().
void print_gdb_version | ( | struct ui_file * | stream, |
bool | interactive ) |
Definition at line 1321 of file top.c.
References file_name_style, gdb_printf(), host_name, PKGVERSION, REPORT_BUGS_TO, cli_style_option::style(), styled_string(), target_name, version, and version_style.
Referenced by captured_main_1(), and show_version().
Definition at line 1670 of file top.c.
References gdb_printf(), inf::pid, and target_pid_to_str().
Referenced by quit_confirm().
int quit_confirm | ( | void | ) |
Definition at line 1689 of file top.c.
References all_inferiors(), string_file::c_str(), have_live_inferiors(), print_inferior_quit_action(), ui_file::puts(), and query().
Referenced by quit_command().
void quit_force | ( | int * | exit_arg, |
int | from_tty ) |
Definition at line 1732 of file top.c.
References all_inferiors(), all_uis(), check_quit_flag(), disconnect_tracing(), exception_print(), finalize_values(), gdb::observers::gdb_exiting, gdb_safe_append_history(), gdb_stderr, history_filename, ui::input_interactive_p(), kill_or_detach(), return_child_result, return_child_result_value, sync_quit_force_run, undo_terminal_modifications_before_exit(), and write_history_p.
Referenced by async_sigterm_handler(), bpfinishpy_init(), captured_main(), captured_main_1(), catch_command_errors(), gdbpy_convert_exception(), gdbpy_lookup_static_symbol(), gdbpy_readline_wrapper(), gdbscm_value_address(), gdbscm_wrap(), mi_cmd_gdb_exit(), mi_execute_command(), ppscm_pretty_print_one_value(), quit_command(), tyscm_type_name(), and valpy_get_address().
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().
const char * repeat_previous | ( | ) |
Definition at line 716 of file top.c.
References dont_repeat(), get_saved_command_line(), previous_repeat_arguments, previous_saved_command_line, repeat_arguments, and saved_command_line.
Referenced by pipe_command(), and with_command_1().
void save_command_line | ( | const char * | cmd | ) |
Definition at line 751 of file top.c.
References previous_repeat_arguments, previous_saved_command_line, repeat_arguments, saved_command_line, and xfree().
Referenced by handle_line_of_input().
|
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().
|
static |
Definition at line 2077 of file top.c.
References gdb_datadir, gdb::observers::gdb_datadir_changed, set_gdb_data_directory(), and staged_gdb_datadir.
Referenced by init_main().
|
static |
|
static |
Definition at line 1935 of file top.c.
References history_size_setshow_var, and set_readline_history_size().
Referenced by init_main().
void set_prompt | ( | const char * | s | ) |
|
static |
Definition at line 1923 of file top.c.
Referenced by init_history(), and set_history_size_command().
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().
void set_verbose | ( | const char * | args, |
int | from_tty, | ||
struct cmd_list_element * | c ) |
Definition at line 1945 of file top.c.
References CMD_LIST_AMBIGUOUS, cmd_list_element::doc, cmd_list_element::doc_allocated, info_verbose, lookup_cmd_1(), showlist, and xfree().
|
static |
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().
|
static |
|
static |
Definition at line 2044 of file top.c.
References ui::command_editing, current_ui, and gdb_printf().
Referenced by init_main().
|
static |
|
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().
|
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().
|
static |
|
static |
|
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().
|
static |
|
static |
|
static |
Definition at line 856 of file top.c.
References gdb_printf(), history_filename, and write_history_p.
Referenced by init_main().
void unbuffer_stream | ( | FILE * | stream | ) |
Definition at line 261 of file top.c.
References ISATTY.
Referenced by read_command_file(), and ui::ui().
|
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().
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().
|
static |
Definition at line 1115 of file top.c.
Referenced by gdb_add_history(), and gdb_safe_append_history().
|
static |
Definition at line 837 of file top.c.
Referenced by command_line_input(), and init_main().
bool confirm = true |
Definition at line 134 of file top.c.
Referenced by ATTRIBUTE_PRINTF(), ATTRIBUTE_PRINTF(), and init_main().
void(* deprecated_attach_hook) (void) | ( | void | ) |
Definition at line 245 of file top.c.
Referenced by attach_post_wait().
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().
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().
void(* deprecated_detach_hook) (void) | ( | void | ) |
Definition at line 246 of file top.c.
Referenced by detach_command(), disconnect_command(), and generic_mourn_inferior().
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 ) |
Definition at line 214 of file top.c.
Referenced by clear_interpreter_hooks(), print_frame_info(), tui_install_hooks(), and tui_remove_hooks().
int(* deprecated_query_hook) (const char *, va_list) | ( | const char * | , |
va_list | ) |
Definition at line 220 of file top.c.
Referenced by ATTRIBUTE_PRINTF(), clear_interpreter_hooks(), mi_insert_notify_hooks(), and mi_remove_notify_hooks().
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().
void(* deprecated_readline_end_hook) (void) | ( | void | ) |
Definition at line 240 of file top.c.
Referenced by clear_interpreter_hooks(), and read_command_lines().
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().
int(* deprecated_ui_loop_hook) (int) | ( | int | signo | ) |
Definition at line 209 of file top.c.
Referenced by do_ser_base_readchar(), gdb_os_poll_quit(), windows_nat_target::wait(), and wait_for_connect().
void(* deprecated_warning_hook) (const char *, va_list) | ( | const char * | , |
va_list | ) |
Definition at line 224 of file top.c.
Referenced by clear_interpreter_hooks(), complaint_interceptor::complaint_interceptor(), complaint_internal(), vwarning(), and complaint_interceptor::~complaint_interceptor().
|
static |
Definition at line 924 of file top.c.
Referenced by gdb_readline_wrapper(), gdb_readline_wrapper_line(), and gdb_readline_wrapper_cleanup::~gdb_readline_wrapper_cleanup().
|
static |
Definition at line 928 of file top.c.
Referenced by gdb_readline_wrapper(), gdb_readline_wrapper_line(), and gdb_readline_wrapper_cleanup::~gdb_readline_wrapper_cleanup().
bool history_expansion_p |
Definition at line 843 of file top.c.
Referenced by handle_line_of_input(), and init_main().
|
static |
Definition at line 852 of file top.c.
Referenced by gdb_safe_append_history(), init_history(), init_main(), quit_force(), set_history_filename(), show_history_filename(), and show_write_history_p().
|
static |
Definition at line 881 of file top.c.
Referenced by gdb_add_history(), and init_main().
|
static |
Definition at line 869 of file top.c.
Referenced by init_history(), init_main(), and set_history_size_command().
bool info_verbose = false |
Definition at line 1941 of file top.c.
Referenced by collection_list::add_memrange(), collection_list::add_remote_register(), collection_list::add_static_trace_data(), check_frame_language_change(), checkpoint_command(), close_with_trace(), collection_list::collect_symbol(), windows_nat_target::delete_thread(), encode_actions_1(), partial_symtab::expand_dependencies(), fbsd_nat_target::find_memory_regions(), nbsd_nat_target::find_memory_regions(), gcore_command(), gcore_create_callback(), gcore_create_memtag_section_callback(), lm_addr_check(), map_overlay_command(), mdebug_expand_psymtab(), merge_uploaded_trace_state_variables(), open_with_trace(), overlay_auto_command(), overlay_manual_command(), overlay_off_command(), parse_external(), post_create_inferior(), print_section_info(), print_symbol_loading_p(), procfs_note(), psymtab_to_symtab(), remote_target::remote_resume_with_hc(), restore_command(), sol_thread_target::resume(), set_verbose(), show_info_verbose(), solib_add(), collection_list::stringify(), svr4_exec_displacement(), tfind_1(), procfs_target::wait(), sol_thread_target::wait(), wait_with_trace(), and write_with_trace().
int inhibit_gdbinit = 0 |
Definition at line 129 of file top.c.
Referenced by _initialize_check_for_gdb_ini(), and captured_main_1().
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().
|
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().
|
static |
Definition at line 165 of file top.c.
Referenced by repeat_previous(), and save_command_line().
|
static |
Definition at line 160 of file top.c.
Referenced by gdb_init(), repeat_previous(), and save_command_line().
int remote_timeout = 2 |
Definition at line 195 of file top.c.
Referenced by captured_main_1(), remote_target::flash_done(), remote_target::flash_erase(), remote_target::getpkt(), remote_target::putpkt_binary(), remote_target::read_frame(), remote_target::remote_flash_write(), and remote_target::skip_frame().
|
static |
Definition at line 153 of file top.c.
Referenced by dont_repeat(), execute_command(), repeat_previous(), save_command_line(), and set_repeat_arguments().
|
static |
Definition at line 936 of file top.c.
Referenced by gdb_readline_wrapper_line(), and gdb_readline_wrapper_cleanup::~gdb_readline_wrapper_cleanup().
|
static |
Definition at line 148 of file top.c.
Referenced by dont_repeat(), dont_repeat_command(), execute_command(), gdb_init(), get_saved_command_line(), repeat_previous(), and save_command_line().
bool server_command |
Definition at line 173 of file top.c.
Referenced by ATTRIBUTE_PRINTF(), breakpoint_1(), dont_repeat(), and handle_line_of_input().
std::string source_file_name |
Definition at line 318 of file top.c.
Referenced by command_line_input(), and script_from_file().
int source_line_number |
Definition at line 312 of file top.c.
Referenced by command_line_input(), and script_from_file().
|
static |
Definition at line 2072 of file top.c.
Referenced by init_main(), and set_gdb_datadir().
|
static |
Definition at line 2117 of file top.c.
Referenced by check_quiet_mode(), and init_main().
|
static |
Definition at line 691 of file top.c.
Referenced by dont_repeat(), and prevent_dont_repeat().
|
static |
Definition at line 1622 of file top.c.
Referenced by get_prompt(), init_main(), and set_prompt().
|
static |
Definition at line 848 of file top.c.
Referenced by init_main(), quit_force(), and show_write_history_p().