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 "readline/readline.h"
#include "readline/history.h"
Go to the source code of this file.
Classes | |
struct | readline_input_state |
Macros | |
#define | SERVER_COMMAND_LENGTH 7 |
Variables | |
void(* | input_handler )(char *) |
void(* | call_readline )(gdb_client_data) |
int | async_command_editing_p |
char * | async_annotation_suffix |
int | exec_done_display_p = 0 |
int | input_fd |
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 |
static int | more_to_come = 0 |
struct readline_input_state | readline_input_state |
void(* | after_char_processing_hook )(void) |
static int | callback_handler_installed |
volatile int | sync_quit_force_run |
#define SERVER_COMMAND_LENGTH 7 |
Referenced by command_line_handler().
void async_disable_stdin | ( | void | ) |
Definition at line 459 of file event-top.c.
References sync_execution.
Referenced by prepare_execution_command(), and run_inferior_call().
void async_enable_stdin | ( | void | ) |
Definition at line 442 of file event-top.c.
References sync_execution, and target_terminal_ours().
Referenced by attach_command_post_wait(), handle_command_errors(), normal_stop(), and start_event_loop().
|
static |
Definition at line 1016 of file event-top.c.
Referenced by async_init_signals().
void async_init_signals | ( | void | ) |
Definition at line 790 of file event-top.c.
References async_float_handler(), async_request_quit(), async_sigterm_handler(), create_async_signal_handler(), handle_sigfpe(), handle_sigint(), and handle_sigterm().
Referenced by gdb_init().
void async_request_quit | ( | gdb_client_data | arg | ) |
Definition at line 892 of file event-top.c.
References check_quit_flag(), and quit().
Referenced by async_init_signals().
|
static |
Definition at line 864 of file event-top.c.
References instream, and quit_force().
Referenced by async_init_signals().
|
static |
Definition at line 196 of file event-top.c.
References async_command_editing_p, call_readline, command_line_handler(), gdb_readline2(), gdb_rl_callback_handler_remove(), input_handler, and rl_callback_read_char_wrapper().
Referenced by set_async_editing_command().
void cli_command_loop | ( | void * | data | ) |
Definition at line 181 of file event-top.c.
References display_gdb_prompt(), and start_event_loop().
Referenced by _initialize_cli_interp(), and _initialize_tui_interp().
|
static |
Definition at line 472 of file event-top.c.
References bpstat_do_actions(), clear_quit_flag(), do_cleanups(), execute_command(), instream, ISATTY, make_command_stats_cleanup(), printf_unfiltered(), and reinitialize_more_filter().
Referenced by command_line_handler().
|
static |
Definition at line 512 of file event-top.c.
References annotation_level, async_annotation_suffix, command_handler(), display_gdb_prompt(), gdb_add_history(), gdb_flush(), gdb_stderr, gdb_stdout, history_expansion_p, input_from_terminal_p(), instream, ISATTY, job_control, readline_input_state::linebuffer, readline_input_state::linebuffer_ptr, more_to_come, printf_unfiltered(), puts_unfiltered(), saved_command_line, saved_command_line_size, server_command, SERVER_COMMAND_LENGTH, source_file_name, source_line_number, wrap_here(), xfree(), xmalloc(), and xrealloc().
Referenced by change_line_handler(), and gdb_setup_readline().
void display_gdb_prompt | ( | const char * | new_prompt | ) |
Definition at line 291 of file event-top.c.
References annotate_display_prompt(), async_command_editing_p, do_cleanups(), fputs_unfiltered(), free_current_contents(), gdb_flush(), gdb_rl_callback_handler_install(), gdb_rl_callback_handler_remove(), gdb_stdout, make_cleanup(), reset_command_nest_depth(), sync_execution, and top_level_prompt().
Referenced by cli_command_loop(), cli_on_command_error(), cli_on_sync_execution_done(), command_line_handler(), gdb_readline_wrapper(), tui_on_command_error(), and tui_on_sync_execution_done().
void gdb_disable_readline | ( | void | ) |
Definition at line 1094 of file event-top.c.
References delete_file_handler(), gdb_rl_callback_handler_remove(), gdb_stderr, gdb_stdlog, gdb_stdout, gdb_stdtarg, gdb_stdtargerr, input_fd, and ui_file_delete().
Referenced by cli_interpreter_suspend(), and mi_interpreter_suspend().
void gdb_readline2 | ( | gdb_client_data | client_data | ) |
Definition at line 710 of file event-top.c.
References instream, ISATTY, xfree(), xmalloc(), and xrealloc().
Referenced by change_line_handler(), gdb_setup_readline(), and mi_interpreter_resume().
void gdb_rl_callback_handler_install | ( | const char * | prompt | ) |
Definition at line 249 of file event-top.c.
References callback_handler_installed, gdb_assert, and input_handler.
Referenced by display_gdb_prompt(), and gdb_rl_callback_handler_reinstall().
void gdb_rl_callback_handler_reinstall | ( | void | ) |
Definition at line 263 of file event-top.c.
References callback_handler_installed, and gdb_rl_callback_handler_install().
Referenced by reinstall_readline_callback_handler_cleanup().
void gdb_rl_callback_handler_remove | ( | void | ) |
Definition at line 238 of file event-top.c.
References callback_handler_installed.
Referenced by change_line_handler(), display_gdb_prompt(), gdb_disable_readline(), and gdb_readline_wrapper_line().
void gdb_setup_readline | ( | void | ) |
Definition at line 1036 of file event-top.c.
References add_file_handler(), async_command_editing_p, batch_silent, call_readline, command_line_handler(), gdb_readline2(), gdb_stderr, gdb_stdlog, gdb_stdout, gdb_stdtarg, gdb_stdtargerr, input_fd, input_handler, instream, ISATTY, rl_callback_read_char_wrapper(), stderr_fileopen(), stdin_event_handler(), and stdio_fileopen().
Referenced by cli_interpreter_resume(), mi_interpreter_resume(), and tui_resume().
|
static |
Definition at line 1008 of file event-top.c.
References mark_async_signal_handler().
Referenced by async_init_signals().
void handle_sigint | ( | int | sig | ) |
Definition at line 839 of file event-top.c.
References gdb_call_async_signal_handler(), handle_sigint(), immediate_quit, and set_quit_flag().
Referenced by async_cleanup_sigint_signal_handler(), async_init_signals(), handle_sigint(), install_gdb_sigint_handler(), and record_full_wait_1().
void handle_sigterm | ( | int | sig | ) |
Definition at line 875 of file event-top.c.
References handle_sigterm(), mark_async_signal_handler(), set_quit_flag(), sync_quit_force_run, and target_can_async_p.
Referenced by async_init_signals(), and handle_sigterm().
|
static |
Definition at line 169 of file event-top.c.
References after_char_processing_hook.
Referenced by change_line_handler(), and gdb_setup_readline().
void set_async_editing_command | ( | char * | args, |
int | from_tty, | ||
struct cmd_list_element * | c | ||
) |
Definition at line 1026 of file event-top.c.
References change_line_handler().
Referenced by init_main().
void stdin_event_handler | ( | int | error, |
gdb_client_data | client_data | ||
) |
Definition at line 416 of file event-top.c.
References _, call_stdin_event_handler_again_p, delete_file_handler(), discard_all_continuations(), discard_all_intermediate_continuations(), input_fd, instream, printf_unfiltered(), and quit_command().
Referenced by gdb_setup_readline(), linux_nat_terminal_ours(), and remote_terminal_ours().
|
static |
Definition at line 364 of file event-top.c.
References annotation_level, async_annotation_suffix, get_prompt(), observer_notify_before_prompt(), xfree(), and xmalloc().
Referenced by display_gdb_prompt().
void(* after_char_processing_hook) (void) |
Definition at line 162 of file event-top.c.
Referenced by gdb_readline_wrapper(), gdb_readline_wrapper_cleanup(), gdb_readline_wrapper_line(), gdb_rl_operate_and_get_next(), gdb_rl_operate_and_get_next_completion(), rl_callback_read_char_wrapper(), and start_event_loop().
char* async_annotation_suffix |
Definition at line 112 of file event-top.c.
Referenced by command_line_handler(), init_main(), and top_level_prompt().
int async_command_editing_p |
Definition at line 108 of file event-top.c.
Referenced by change_line_handler(), display_gdb_prompt(), gdb_readline_wrapper_line(), gdb_setup_readline(), init_main(), mi_interpreter_resume(), reinstall_readline_callback_handler_cleanup(), and tui_getc().
|
static |
Definition at line 144 of file event-top.c.
void(* call_readline) (gdb_client_data) |
Definition at line 98 of file event-top.c.
Referenced by change_line_handler(), gdb_setup_readline(), and mi_interpreter_resume().
int call_stdin_event_handler_again_p |
Definition at line 125 of file event-top.c.
Referenced by stdin_event_handler(), and tui_getc().
|
static |
Definition at line 233 of file event-top.c.
Referenced by gdb_rl_callback_handler_install(), gdb_rl_callback_handler_reinstall(), and gdb_rl_callback_handler_remove().
int exec_done_display_p = 0 |
Definition at line 116 of file event-top.c.
Referenced by fetch_inferior_event(), and init_main().
int input_fd |
Definition at line 120 of file event-top.c.
Referenced by gdb_disable_readline(), gdb_setup_readline(), linux_nat_terminal_inferior(), linux_nat_terminal_ours(), remote_terminal_inferior(), remote_terminal_ours(), and stdin_event_handler().
void(* input_handler) (char *) |
Definition at line 97 of file event-top.c.
Referenced by change_line_handler(), gdb_readline_wrapper(), gdb_readline_wrapper_cleanup(), gdb_rl_callback_handler_install(), gdb_setup_readline(), and mi_interpreter_resume().
|
static |
Definition at line 151 of file event-top.c.
Referenced by command_line_handler().
|
static |
Definition at line 140 of file event-top.c.
|
static |
Definition at line 133 of file event-top.c.
volatile int sync_quit_force_run |
Definition at line 870 of file event-top.c.
Referenced by handle_sigterm(), maybe_quit(), and quit().