GDB (xrefs)

Functions | Variables
/tmp/gdb-8.1/gdb/event-top.h File Reference
`#include <signal.h>`

Go to the source code of this file.

## Functions
void | display_gdb_prompt (const char *new_prompt)
void | gdb_setup_readline (int)
void | gdb_disable_readline (void)
void | async_init_signals (void)
void | change_line_handler (int)
void | command_line_handler (char *rl)
void | command_handler (const char *command)
void | handle_sigint (int sig)
void | handle_sigterm (int sig)
void | async_request_quit (void *arg)
void | stdin_event_handler (int error, void *client_data)
void | async_disable_stdin (void)
void | async_enable_stdin (void)
void | gdb_readline_no_editing_callback (void *client_data)
void | gdb_rl_callback_handler_remove (void)
void | gdb_rl_callback_handler_install (const char *prompt)
void | gdb_rl_callback_handler_reinstall (void)

## Variables
int | set_editing_cmd_var
int | exec_done_display_p
struct prompts | the_prompts
void(* | after_char_processing_hook )(void)
int | call_stdin_event_handler_again_p

## Function Documentation

## ◆ async_disable_stdin()

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().

## ◆ async_enable_stdin()

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().

## ◆ 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().

## ◆ async_request_quit()

void async_request_quit | ( | void * | arg | ) |

Definition at line 1044 of file event-top.c.

References QUIT.

Referenced by async_init_signals().

## ◆ change_line_handler()

void change_line_handler | ( | int |  | ) |

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().

## ◆ command_handler()

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().

## ◆ command_line_handler()

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().

## ◆ display_gdb_prompt()

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().

## ◆ gdb_disable_readline()

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().

## ◆ gdb_readline_no_editing_callback()

void gdb_readline_no_editing_callback | ( | void * | 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().

## ◆ 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().

## ◆ 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().

## ◆ gdb_rl_callback_handler_remove()

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().

## ◆ gdb_setup_readline()

void gdb_setup_readline | ( | int |  | ) |

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().

## ◆ handle_sigint()

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().

## ◆ handle_sigterm()

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().

## ◆ stdin_event_handler()

void stdin_event_handler | ( | int | error,
|  | void * | 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().

## Variable Documentation

## ◆ after_char_processing_hook

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().

## ◆ call_stdin_event_handler_again_p

int call_stdin_event_handler_again_p

Definition at line 98 of file event-top.c.

Referenced by stdin_event_handler(), and tui_getc().

## ◆ exec_done_display_p

int exec_done_display_p

Definition at line 93 of file event-top.c.

Referenced by fetch_inferior_event(), and init_main().

## ◆ set_editing_cmd_var

int set_editing_cmd_var

Definition at line 89 of file event-top.c.

Referenced by init_main(), and set_editing().

## ◆ the_prompts

struct prompts the_prompts