GDB (xrefs)
|
#include "gdbsupport/buffer.h"
#include "gdbsupport/event-loop.h"
#include "gdbsupport/next-iterator.h"
#include "value.h"
Go to the source code of this file.
Classes | |
struct | ui |
class | switch_thru_all_uis |
Macros | |
#define | SWITCH_THRU_ALL_UIS() for (switch_thru_all_uis stau_state; !stau_state.done (); stau_state.next ()) |
Typedefs | |
using | ui_range = next_range< ui > |
Enumerations | |
enum | prompt_state { PROMPT_BLOCKED , PROMPT_NEEDED , PROMPTED } |
Functions | |
static ui_range | all_uis () |
void | print_gdb_version (struct ui_file *stream, bool interactive) |
void | print_gdb_configuration (struct ui_file *) |
void | read_command_file (FILE *) |
void | init_history (void) |
void | command_loop (void) |
int | quit_confirm (void) |
void | quit_force (int *, int) |
void | quit_command (const char *, int) |
void | quit_cover (void) |
void | execute_command (const char *, int) |
void | maybe_wait_sync_command_done (int was_sync) |
void | wait_sync_command_done (void) |
void | check_frame_language_change (void) |
scoped_value_mark | prepare_execute_command (void) |
const std::string & | get_prompt () |
void | set_prompt (const char *s) |
int | gdb_in_secondary_prompt_p (struct ui *ui) |
void | gdb_init () |
void | gdb_add_history (const char *) |
void | show_commands (const char *args, int from_tty) |
void | set_verbose (const char *, int, struct cmd_list_element *) |
const char * | handle_line_of_input (std::string &cmd_line_buffer, const char *rl, int repeat, const char *annotation_suffix) |
bool | check_quiet_mode () |
Variables | |
struct ui * | main_ui |
struct ui * | current_ui |
struct ui * | ui_list |
bool | confirm |
int | inhibit_gdbinit |
int | source_line_number |
std::string | source_file_name |
bool | history_expansion_p |
bool | server_command |
char * | lim_at_start |
#define SWITCH_THRU_ALL_UIS | ( | ) | for (switch_thru_all_uis stau_state; !stau_state.done (); stau_state.next ()) |
enum prompt_state |
|
inlinestatic |
Definition at line 217 of file top.h.
References ui_list.
Referenced by handle_no_resumed(), and quit_force().
void check_frame_language_change | ( | void | ) |
Definition at line 487 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 | ( | ) |
void command_loop | ( | void | ) |
void execute_command | ( | const char * | p, |
int | from_tty | ||
) |
Definition at line 574 of file top.c.
Referenced by execute_command_to_string(), and execute_command_to_ui_file().
void gdb_add_history | ( | const char * | command | ) |
Definition at line 1233 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 1060 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 2393 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().
const std::string & get_prompt | ( | ) |
const char * handle_line_of_input | ( | std::string & | cmd_line_buffer, |
const char * | rl, | ||
int | repeat, | ||
const char * | annotation_suffix | ||
) |
Definition at line 669 of file event-top.c.
References annotation_level, command_line_append_input_line(), complete(), current_ui, gdb_add_history(), get_saved_command_line(), history_expansion_p, ui::input_interactive_p(), ui::instream, printf_unfiltered(), save_command_line(), server_command, SERVER_COMMAND_PREFIX, and ui::stdin_stream.
Referenced by command_line_handler(), and command_line_input().
void init_history | ( | void | ) |
Definition at line 2058 of file top.c.
References history_filename, history_size_setshow_var, INT_MAX, set_readline_history_size(), and cmd_list_element::var.
Referenced by captured_main_1().
void maybe_wait_sync_command_done | ( | int | was_sync | ) |
Definition at line 550 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 471 of file top.c.
References non_stop, and target_dcache_invalidate().
Referenced by execute_command(), and mi_cmd_execute().
void print_gdb_configuration | ( | struct ui_file * | stream | ) |
Definition at line 1506 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 1434 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().
void quit_command | ( | const char * | args, |
int | from_tty | ||
) |
Definition at line 475 of file cli-cmds.c.
References exception_print(), gdb_stderr, parse_and_eval(), query_if_trace_running(), quit_confirm(), quit_force(), and value_as_long().
Referenced by captured_command_loop(), and stdin_event_handler().
int quit_confirm | ( | void | ) |
Definition at line 1765 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_cover | ( | void | ) |
void quit_force | ( | int * | exit_arg, |
int | from_tty | ||
) |
Definition at line 1808 of file top.c.
References all_inferiors(), all_uis(), 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, undo_terminal_modifications_before_exit(), and write_history_p.
Referenced by async_sigterm_handler(), captured_main_1(), mi_cmd_gdb_exit(), mi_execute_command(), quit(), and quit_command().
void read_command_file | ( | FILE * | stream | ) |
Definition at line 437 of file top.c.
References command_handler(), command_line_input(), current_ui, ui::instream, and unbuffer_stream().
Referenced by script_from_file().
void set_prompt | ( | const char * | s | ) |
Definition at line 1711 of file top.c.
References top_prompt.
Referenced by gdbpy_before_prompt_hook(), and init_main().
void set_verbose | ( | const char * | args, |
int | from_tty, | ||
struct cmd_list_element * | c | ||
) |
Definition at line 2026 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().
void show_commands | ( | const char * | args, |
int | from_tty | ||
) |
Definition at line 1942 of file top.c.
References gdb_printf(), Hist_print, ui::num, parse_and_eval_long(), and set_repeat_arguments().
void wait_sync_command_done | ( | void | ) |
Definition at line 529 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().
|
extern |
Definition at line 133 of file top.c.
Referenced by ATTRIBUTE_PRINTF(), and init_main().
|
extern |
Definition at line 483 of file event-top.c.
Referenced by abort_with_message(), all_uis_on_sync_execution_starting(), annotate_breakpoints_invalid(), annotate_frames_invalid(), async_disable_stdin(), async_enable_stdin(), ATTRIBUTE_PRINTF(), bpstat_do_actions_1(), call_function_by_hand_dummy(), captured_command_loop(), captured_main_1(), catch_command_errors(), change_line_handler(), check_curr_ui_sync_execution_done(), cli_ui_out::clear_current_line(), command_handler(), command_line_handler(), command_line_input(), compile_code_command(), compile_file_command(), compile_print_command(), continue_1(), current_interpreter(), current_ui_current_uiout_ptr(), current_ui_gdb_stderr_ptr(), current_ui_gdb_stdin_ptr(), current_ui_gdb_stdlog_ptr(), current_ui_gdb_stdout_ptr(), display_gdb_prompt(), display_mi_prompt(), cli_ui_out::do_progress_notify(), dont_repeat(), execute_command(), execute_control_command(), execute_control_commands(), execute_fn_to_ui_file(), execute_gdb_command(), execute_user_command(), fetch_inferior_event(), follow_fork_inferior(), gdb_disable_readline(), gdb_internal_backtrace(), gdb_readline_no_editing(), gdb_readline_no_editing_callback(), gdb_readline_wrapper(), gdb_readline_wrapper_cleanup::gdb_readline_wrapper_cleanup(), gdb_readline_wrapper_line(), gdb_rl_callback_handler(), gdb_rl_callback_handler_install(), gdb_rl_callback_handler_reinstall(), gdb_rl_callback_handler_remove(), gdb_setup_readline(), get_command_line_buffer(), get_current_interp_info(), handle_line_of_input(), if_command(), target_terminal::inferior(), inferior_event_handler(), interpreter_exec_cmd(), invoke_async_signal_handlers(), ioscm_with_output_to_port_worker(), maybe_wait_sync_command_done(), mi_cmd_interpreter_exec(), mi_execute_command(), mi_execute_command_input_handler(), mi_execute_command_wrapper(), mi_on_normal_stop_1(), mi_on_resume_1(), new_ui_command(), switch_thru_all_uis::next(), normal_stop(), target_terminal::ours(), target_terminal::ours_for_output(), postfork_child_hook(), postfork_hook(), prefork_hook(), print_flush(), python_command(), python_interactive_command(), read_command_file(), read_command_lines(), read_next_line(), reinstall_readline_callback_handler_cleanup(), target_terminal::restore_inferior(), cli_interp::resume(), mi_interp::resume(), tui_interp::resume(), run_inferior_call(), scoped_input_handler::scoped_input_handler(), script_from_file(), set_editing(), scoped_restore_interp::set_interp(), set_top_level_interpreter(), call_thread_fsm::should_stop(), show_editing(), show_interactive_mode(), start_event_loop(), stdin_event_handler(), switch_thru_all_uis::switch_thru_all_uis(), tui_getc_1(), tui_inject_newline_into_command_window(), tui_redisplay_readline(), tui_rl_startup_hook(), undo_terminal_modifications_before_exit(), wait_sync_command_done(), while_command(), with_command_1(), and gdb_readline_wrapper_cleanup::~gdb_readline_wrapper_cleanup().
|
extern |
Definition at line 961 of file top.c.
Referenced by handle_line_of_input(), and init_main().
|
extern |
Definition at line 128 of file top.c.
Referenced by _initialize_check_for_gdb_ini(), and captured_main_1().
|
extern |
|
extern |
Definition at line 482 of file event-top.c.
Referenced by ATTRIBUTE_PRINTF(), captured_main_1(), change_line_handler(), fetch_inferior_event(), gdb_flush_out_err(), gdb_rl_callback_handler_install(), gdb_rl_callback_handler_reinstall(), gdb_rl_callback_handler_remove(), gdb_setup_readline(), target_terminal::inferior(), invoke_async_signal_handlers(), target_terminal::ours(), target_terminal::ours_for_output(), postfork_child_hook(), target_terminal::restore_inferior(), stdin_event_handler(), and undo_terminal_modifications_before_exit().
|
extern |
Definition at line 172 of file top.c.
Referenced by ATTRIBUTE_PRINTF(), breakpoint_1(), dont_repeat(), and handle_line_of_input().
|
extern |
Definition at line 433 of file top.c.
Referenced by command_line_input(), and script_from_file().
|
extern |
Definition at line 427 of file top.c.
Referenced by command_line_input(), and script_from_file().
|
extern |
Definition at line 484 of file event-top.c.
Referenced by all_uis(), switch_thru_all_uis::switch_thru_all_uis(), ui::ui(), and ui::~ui().