|
GDB (xrefs)
|
#include "defs.h"#include "top.h"#include "inferior.h"#include "infrun.h"#include "target.h"#include "terminal.h"#include "event-loop.h"#include "event-top.h"#include "interps.h"#include <signal.h>#include "cli/cli-script.h"#include "main.h"#include "gdbthread.h"#include "observer.h"#include "continuations.h"#include "gdbcmd.h"#include "annotate.h"#include "maint.h"#include "buffer.h"#include "ser-event.h"#include "gdb_select.h"#include "readline/readline.h"#include "readline/history.h"Go to the source code of this file.
Macros | |
| #define | SERVER_COMMAND_PREFIX "server " |
Variables | |
| int | set_editing_cmd_var |
| int | exec_done_display_p = 0 |
| int | call_stdin_event_handler_again_p |
| static struct async_signal_handler * | sigint_token |
| static struct async_signal_handler * | sigfpe_token |
| static struct async_signal_handler * | async_sigterm_token |
| void(* | after_char_processing_hook )(void) |
| static int | callback_handler_installed |
| struct ui * | main_ui |
| struct ui * | current_ui |
| struct ui * | ui_list |
| static struct serial_event * | quit_serial_event |
| quit_handler_ftype * | quit_handler = default_quit_handler |
| volatile int | sync_quit_force_run |
| #define SERVER_COMMAND_PREFIX "server " |
Referenced by handle_line_of_input().
| void async_disable_stdin | ( | void | ) |
Definition at line 554 of file event-top.c.
References current_ui, delete_file_handler(), ui::input_fd, PROMPT_BLOCKED, and ui::prompt_state.
Referenced by all_uis_on_sync_execution_starting().
| void async_enable_stdin | ( | void | ) |
Definition at line 538 of file event-top.c.
References current_ui, target_terminal::ours(), PROMPT_BLOCKED, PROMPT_NEEDED, ui::prompt_state, and ui_register_input_event_handler().
Referenced by handle_command_errors(), mi_execute_command(), normal_stop(), and start_event_loop().
|
static |
Definition at line 1162 of file event-top.c.
Referenced by async_init_signals().
| void async_init_signals | ( | void | ) |
Definition at line 872 of file event-top.c.
References async_float_handler(), async_request_quit(), async_sigterm_handler(), async_sigterm_token, create_async_signal_handler(), handle_sigfpe(), handle_sigint(), handle_sigterm(), initialize_async_signal_handlers(), make_serial_event(), quit_serial_event, sigfpe_token, and sigint_token.
Referenced by gdb_init().
| void async_request_quit | ( | gdb_client_data | arg | ) |
|
static |
Definition at line 1021 of file event-top.c.
References quit_force().
Referenced by async_init_signals().
| void change_line_handler | ( | int | editing | ) |
Definition at line 246 of file event-top.c.
References ui::call_readline, ui::command_editing, command_interp(), current_ui, gdb_assert, gdb_readline_no_editing_callback(), gdb_rl_callback_handler_remove(), gdb_rl_callback_read_char_wrapper(), interp_supports_command_editing(), main_ui, and top_level_interpreter().
Referenced by set_editing().
| void command_handler | ( | const char * | command | ) |
Definition at line 568 of file event-top.c.
References bpstat_do_actions(), current_ui, execute_command(), ui::instream, reinitialize_more_filter(), and ui::stdin_stream.
Referenced by command_line_handler(), and read_command_file().
|
static |
Definition at line 597 of file event-top.c.
References buffer::buffer, buffer_grow(), and xfree().
Referenced by handle_line_of_input().
| void command_line_handler | ( | char * | rl | ) |
Definition at line 749 of file event-top.c.
References command_handler(), current_ui, display_gdb_prompt(), execute_command(), get_command_line_buffer(), handle_line_of_input(), ui::line_buffer, printf_unfiltered(), PROMPT_NEEDED, ui::prompt_state, and PROMPTED.
Referenced by cli_interp::resume(), and tui_interp::resume().
| void default_quit_handler | ( | void | ) |
Definition at line 950 of file event-top.c.
References check_quit_flag(), target_terminal::is_ours(), quit(), and target_pass_ctrlc().
| void display_gdb_prompt | ( | const char * | new_prompt | ) |
Definition at line 353 of file event-top.c.
References _, annotate_display_prompt(), ui::command_editing, current_ui, fputs_unfiltered(), gdb_flush(), gdb_rl_callback_handler_install(), gdb_rl_callback_handler_remove(), gdb_stdout, internal_error(), PROMPT_BLOCKED, PROMPT_NEEDED, ui::prompt_state, PROMPTED, reset_command_nest_depth(), string, and top_level_prompt().
Referenced by cli_on_command_error(), cli_on_sync_execution_done(), command_line_handler(), gdb_readline_wrapper(), cli_interp_base::pre_command_loop(), tui_on_command_error(), and tui_on_sync_execution_done().
| void gdb_disable_readline | ( | void | ) |
Definition at line 1226 of file event-top.c.
References ui::command_editing, current_ui, delete_file_handler(), gdb_rl_callback_handler_remove(), gdb_stderr, gdb_stdlog, gdb_stdout, gdb_stdtarg, gdb_stdtargerr, and ui::input_fd.
Referenced by cli_interp::suspend(), mi_interp::suspend(), and undo_terminal_modifications_before_exit().
| void gdb_readline_no_editing_callback | ( | gdb_client_data | client_data | ) |
Definition at line 786 of file event-top.c.
References buffer::buffer, buffer_finish(), buffer_grow_char(), buffer_init(), current_ui, ui::input_handler, ui::instream, ISATTY, ui::line_buffer, ui::stdin_stream, buffer::used_size, and xfree().
Referenced by change_line_handler(), gdb_setup_readline(), and mi_interp::resume().
|
staticnoexcept |
Definition at line 206 of file event-top.c.
References CATCH, current_ui, END_CATCH, exception_none, ui::input_handler, gdb_exception::reason, RETURN_MASK_ALL, throw_exception_sjlj(), and TRY.
Referenced by gdb_rl_callback_handler_install().
| void gdb_rl_callback_handler_install | ( | const char * | prompt | ) |
Definition at line 307 of file event-top.c.
References callback_handler_installed, current_ui, gdb_assert, gdb_rl_callback_handler(), and main_ui.
Referenced by display_gdb_prompt(), and gdb_rl_callback_handler_reinstall().
| void gdb_rl_callback_handler_reinstall | ( | void | ) |
Definition at line 323 of file event-top.c.
References callback_handler_installed, current_ui, gdb_assert, gdb_rl_callback_handler_install(), and main_ui.
Referenced by reinstall_readline_callback_handler_cleanup().
| void gdb_rl_callback_handler_remove | ( | void | ) |
Definition at line 294 of file event-top.c.
References callback_handler_installed, current_ui, gdb_assert, and main_ui.
Referenced by change_line_handler(), display_gdb_prompt(), gdb_disable_readline(), and gdb_readline_wrapper_line().
|
static |
Definition at line 189 of file event-top.c.
References gdb_rl_callback_read_char_wrapper_noexcept(), gdb_exception::reason, and throw_exception().
Referenced by change_line_handler(), and gdb_setup_readline().
|
staticnoexcept |
Definition at line 165 of file event-top.c.
References after_char_processing_hook, CATCH_SJLJ, END_CATCH_SJLJ, exception_none, RETURN_MASK_ALL, and TRY_SJLJ.
Referenced by gdb_rl_callback_read_char_wrapper().
| void gdb_setup_readline | ( | int | editing | ) |
Definition at line 1176 of file event-top.c.
References batch_silent, ui::call_readline, ui::command_editing, current_ui, ui::errstream, gdb_readline_no_editing_callback(), gdb_rl_callback_read_char_wrapper(), gdb_stderr, gdb_stdlog, gdb_stdout, gdb_stdtarg, gdb_stdtargerr, ui::instream, ISATTY, main_ui, ui::outstream, and ui_register_input_event_handler().
Referenced by cli_interp::resume(), tui_interp::resume(), and mi_interp::resume().
|
static |
Definition at line 460 of file event-top.c.
References current_ui, and ui::line_buffer.
Referenced by command_line_handler().
| char* handle_line_of_input | ( | struct buffer * | cmd_line_buffer, |
| char * | rl, | ||
| int | repeat, | ||
| const char * | annotation_suffix | ||
| ) |
Definition at line 645 of file event-top.c.
References annotation_level, buffer::buffer, buffer_finish(), buffer::buffer_size, command_line_append_input_line(), current_ui, gdb_add_history(), history_expansion_p, input_interactive_p(), ui::instream, printf_unfiltered(), puts_unfiltered(), saved_command_line, server_command, SERVER_COMMAND_PREFIX, startswith(), ui::stdin_stream, buffer::used_size, and xfree().
Referenced by command_line_handler(), and command_line_input().
|
static |
Definition at line 1154 of file event-top.c.
References mark_async_signal_handler(), and sigfpe_token.
Referenced by async_init_signals().
| void handle_sigint | ( | int | sig | ) |
Definition at line 967 of file event-top.c.
References handle_sigint(), mark_async_signal_handler(), set_quit_flag(), and sigint_token.
Referenced by async_init_signals(), handle_sigint(), install_gdb_sigint_handler(), and record_full_wait_1().
| void handle_sigterm | ( | int | sig | ) |
Definition at line 1032 of file event-top.c.
References async_sigterm_token, handle_sigterm(), mark_async_signal_handler(), set_quit_flag(), and sync_quit_force_run.
Referenced by async_init_signals(), and handle_sigterm().
| int interruptible_select | ( | int | n, |
| fd_set * | readfds, | ||
| fd_set * | writefds, | ||
| fd_set * | exceptfds, | ||
| struct timeval * | timeout | ||
| ) |
Definition at line 985 of file event-top.c.
References gdb_select(), and quit_serial_event_fd().
Referenced by gdb_readline_no_editing(), ioscm_input_waiting(), stdio_file::read(), and ser_base_wait_for().
| void quit_serial_event_clear | ( | void | ) |
Definition at line 933 of file event-top.c.
References quit_serial_event, and serial_event_clear().
Referenced by check_quit_flag().
|
static |
Definition at line 942 of file event-top.c.
References quit_serial_event, and serial_event_fd().
Referenced by interruptible_select().
| void quit_serial_event_set | ( | void | ) |
Definition at line 925 of file event-top.c.
References quit_serial_event, and serial_event_set().
Referenced by set_quit_flag().
| void stdin_event_handler | ( | int | error, |
| gdb_client_data | client_data | ||
| ) |
Definition at line 471 of file event-top.c.
References _, ui::call_readline, call_stdin_event_handler_again_p, current_ui, delete_file_handler(), error(), ui::input_fd, main_ui, printf_unfiltered(), QUIT, quit_command(), and ui::ui().
Referenced by ui_register_input_event_handler().
|
static |
Definition at line 425 of file event-top.c.
References annotation_level, get_prompt(), observer_notify_before_prompt(), and string.
Referenced by display_gdb_prompt().
| void ui_register_input_event_handler | ( | struct ui * | ui | ) |
Definition at line 520 of file event-top.c.
References add_file_handler(), ui::input_fd, and stdin_event_handler().
Referenced by async_enable_stdin(), check_curr_ui_sync_execution_done(), gdb_setup_readline(), run_inferior_call(), and scoped_input_handler::scoped_input_handler().
| void ui_unregister_input_event_handler | ( | struct ui * | ui | ) |
Definition at line 528 of file event-top.c.
References delete_file_handler(), and ui::input_fd.
Referenced by scoped_input_handler::~scoped_input_handler().
| void(* after_char_processing_hook) (void) |
Definition at line 121 of file event-top.c.
Referenced by gdb_readline_wrapper(), gdb_readline_wrapper_cleanup(), gdb_readline_wrapper_line(), gdb_rl_callback_read_char_wrapper_noexcept(), gdb_rl_operate_and_get_next(), gdb_rl_operate_and_get_next_completion(), and start_event_loop().
|
static |
Definition at line 117 of file event-top.c.
Referenced by async_init_signals(), and handle_sigterm().
| int call_stdin_event_handler_again_p |
Definition at line 98 of file event-top.c.
Referenced by stdin_event_handler(), and tui_getc().
|
static |
Definition at line 289 of file event-top.c.
Referenced by gdb_rl_callback_handler_install(), gdb_rl_callback_handler_reinstall(), and gdb_rl_callback_handler_remove().
| struct ui* current_ui |
Definition at line 453 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(), call_thread_fsm_should_stop(), captured_command_loop(), captured_main_1(), catch_command_errors(), change_line_handler(), check_curr_ui_sync_execution_done(), command_handler(), command_line_handler(), command_line_input(), compile_code_command(), compile_file_command(), compile_print_command(), continue_1(), current_interpreter(), display_gdb_prompt(), display_mi_prompt(), dont_repeat(), execute_command(), execute_command_to_string(), execute_control_command(), execute_gdb_command(), execute_user_command(), fetch_inferior_event(), follow_fork_inferior(), gdb_disable_readline(), gdb_readline_no_editing(), gdb_readline_no_editing_callback(), gdb_readline_wrapper(), 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(), cli_interp::resume(), tui_interp::resume(), mi_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(), show_editing(), show_interactive_mode(), start_event_loop(), stdin_event_handler(), switch_thru_all_uis::switch_thru_all_uis(), tui_getc(), tui_redisplay_readline(), tui_rl_startup_hook(), undo_terminal_modifications_before_exit(), wait_sync_command_done(), and while_command().
| int exec_done_display_p = 0 |
Definition at line 93 of file event-top.c.
Referenced by fetch_inferior_event(), and init_main().
| struct ui* main_ui |
Definition at line 452 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(), stdin_event_handler(), and undo_terminal_modifications_before_exit().
| quit_handler_ftype* quit_handler = default_quit_handler |
Definition at line 962 of file event-top.c.
Referenced by do_remote_fileio_request(), maybe_quit(), readchar(), remote_fileio_reply(), remote_fileio_request(), and remote_serial_write().
|
static |
Definition at line 857 of file event-top.c.
Referenced by async_init_signals(), quit_serial_event_clear(), quit_serial_event_fd(), and quit_serial_event_set().
| int set_editing_cmd_var |
Definition at line 89 of file event-top.c.
Referenced by init_main(), and set_editing().
|
static |
Definition at line 113 of file event-top.c.
Referenced by async_init_signals(), and handle_sigfpe().
|
static |
Definition at line 106 of file event-top.c.
Referenced by async_init_signals(), and handle_sigint().
| volatile int sync_quit_force_run |
Definition at line 1027 of file event-top.c.
Referenced by handle_sigterm(), maybe_quit(), and quit().
| struct ui* ui_list |
Definition at line 454 of file event-top.c.
Referenced by switch_thru_all_uis::switch_thru_all_uis(), ui::ui(), and ui::~ui().
1.8.14