GDB (xrefs)

Typedefs | Functions
/tmp/gdb-8.1/gdb/event-loop.h File Reference

Go to the source code of this file.

## Typedefs
typedef void * | gdb_client_data
typedef void() | handler_func(int, gdb_client_data)
typedef void() | sig_handler_func(gdb_client_data)
typedef void() | async_event_handler_func(gdb_client_data)
typedef void() | timer_handler_func(gdb_client_data)

## Functions
void | start_event_loop (void)
int | gdb_do_one_event (void)
void | delete_file_handler (int fd)
void | add_file_handler (int fd, handler_func *proc, gdb_client_data client_data)
struct async_signal_handler * | create_async_signal_handler (sig_handler_func *proc, gdb_client_data client_data)
void | delete_async_signal_handler (struct async_signal_handler **)
int | create_timer (int milliseconds, timer_handler_func *proc, gdb_client_data client_data)
void | delete_timer (int id)
void | mark_async_signal_handler (struct async_signal_handler *handler)
int | async_signal_handler_is_marked (struct async_signal_handler *handler)
void | clear_async_signal_handler (struct async_signal_handler *handler)
struct async_event_handler * | create_async_event_handler (async_event_handler_func *proc, gdb_client_data client_data)
void | delete_async_event_handler (struct async_event_handler **handler_ptr)
void | mark_async_event_handler (struct async_event_handler *handler)
void | clear_async_event_handler (struct async_event_handler *handler)
void | initialize_async_signal_handlers (void)

## Typedef Documentation

## ◆ async_event_handler_func

typedef void() async_event_handler_func(gdb_client_data)

Definition at line 75 of file event-loop.h.

## ◆ gdb_client_data

typedef void* gdb_client_data

Definition at line 70 of file event-loop.h.

## ◆ handler_func

typedef void() handler_func(int, gdb_client_data)

Definition at line 73 of file event-loop.h.

## ◆ sig_handler_func

typedef void() sig_handler_func(gdb_client_data)

Definition at line 74 of file event-loop.h.

## ◆ timer_handler_func

typedef void() timer_handler_func(gdb_client_data)

Definition at line 76 of file event-loop.h.

## Function Documentation

## ◆ add_file_handler()

void add_file_handler | ( | int | fd,
|  | handler_func * | proc,
|  | gdb_client_data | client_data
| ) |  |

Definition at line 413 of file event-loop.c.

References _, create_file_handler(), GDB_EXCEPTION, GDB_READABLE, internal_error(), and use_poll.

Referenced by gdbpy_initialize_events(), initialize_async_signal_handlers(), linux_nat_async(), reschedule(), ser_base_async(), tui_initialize_io(), and ui_register_input_event_handler().

## ◆ async_signal_handler_is_marked()

int async_signal_handler_is_marked | ( | struct async_signal_handler * | handler | ) |

Definition at line 938 of file event-loop.c.

References async_signal_handler::ready.

## ◆ clear_async_event_handler()

void clear_async_event_handler | ( | struct async_event_handler * | handler | ) |

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

References async_event_handler::ready.

Referenced by infrun_async(), record_btrace_async(), record_full_async(), and remote_async().

## ◆ clear_async_signal_handler()

void clear_async_signal_handler | ( | struct async_signal_handler * | handler | ) |

Definition at line 930 of file event-loop.c.

References async_signal_handler::ready.

## ◆ create_async_event_handler()

struct async_event_handler* create_async_event_handler | ( | async_event_handler_func * | proc,
|  | gdb_client_data | client_data
| ) |  |

Definition at line 1013 of file event-loop.c.

References async_event_handler_list, async_event_handler::client_data, async_event_handler::next_handler, async_event_handler::proc, async_event_handler::ready, and XNEW.

Referenced by _initialize_infrun(), record_btrace_push_target(), record_full_open(), remote_notif_state_allocate(), and remote_open_1().

## ◆ create_async_signal_handler()

struct async_signal_handler* create_async_signal_handler | ( | sig_handler_func * | proc,
|  | gdb_client_data | client_data
| ) |  |

Definition at line 898 of file event-loop.c.

References async_signal_handler::client_data, async_signal_handler::next_handler, async_signal_handler::proc, async_signal_handler::ready, sighandler_list, and XNEW.

Referenced by async_init_signals(), and tui_initialize_win().

## ◆ create_timer()

int create_timer | ( | int | milliseconds,
|  | timer_handler_func * | proc,
|  | gdb_client_data | client_data
| ) |  |

Definition at line 1106 of file event-loop.c.

References gdb_timer::client_data, gdb_notifier, gdb_timer::next, gdb_timer::proc, gdb_timer::timer_id, timer_list, and gdb_timer::when.

Referenced by reschedule().

## ◆ delete_async_event_handler()

void delete_async_event_handler | ( | struct async_event_handler ** | handler_ptr | ) |

Definition at line 1075 of file event-loop.c.

References async_event_handler_list, gdb_assert, async_event_handler::next_handler, and xfree().

Referenced by record_btrace_close(), record_full_close(), remote_close(), and remote_notif_state_xfree().

## ◆ delete_async_signal_handler()

void delete_async_signal_handler | ( | struct async_signal_handler ** |  | ) |

Definition at line 984 of file event-loop.c.

References gdb_assert, async_signal_handler::next_handler, sighandler_list, and xfree().

## ◆ delete_file_handler()

void delete_file_handler | ( | int | fd | ) |

Definition at line 564 of file event-loop.c.

References _, file_handler::fd, GDB_EXCEPTION, gdb_notifier, GDB_READABLE, GDB_WRITABLE, get_next_file_handler_to_handle_and_advance(), internal_error(), file_handler::mask, file_handler::next_file, use_poll, xfree(), and xmalloc().

Referenced by async_disable_stdin(), gdb_disable_readline(), linux_nat_async(), reschedule(), run_inferior_call(), ser_base_async(), ser_base_read_error_fd(), stdin_event_handler(), and ui_unregister_input_event_handler().

## ◆ delete_timer()

void delete_timer | ( | int | id | ) |

Definition at line 1156 of file event-loop.c.

References gdb_notifier, gdb_timer::next, gdb_timer::timer_id, and timer_list.

Referenced by reschedule(), and ser_base_async().

## ◆ gdb_do_one_event()

int gdb_do_one_event | ( | void |  | ) |

Definition at line 295 of file event-loop.c.

References check_async_event_handlers(), gdb_wait_for_event(), internal_error(), invoke_async_signal_handlers(), and poll_timers().

Referenced by gdb_readline_wrapper(), start_event_loop(), and wait_sync_command_done().

## ◆ initialize_async_signal_handlers()

void initialize_async_signal_handlers | ( | void |  | ) |

Definition at line 281 of file event-loop.c.

References add_file_handler(), async_signal_handlers_serial_event, async_signals_handler(), make_serial_event(), and serial_event_fd().

Referenced by async_init_signals().

## ◆ mark_async_event_handler()

void mark_async_event_handler | ( | struct async_event_handler * | handler | ) |

Definition at line 1036 of file event-loop.c.

References async_event_handler::ready.

Referenced by do_target_wait(), finish_step_over(), handle_notification(), infrun_async(), mark_infrun_async_event_handler(), proceed(), push_stop_reply(), queued_stop_reply(), record_btrace_async(), record_btrace_maybe_mark_async_event(), record_btrace_resume(), record_full_async(), remote_async(), remote_notif_stop_can_get_pending_events(), and remote_wait().

## ◆ mark_async_signal_handler()

void mark_async_signal_handler | ( | struct async_signal_handler * | handler | ) |

Definition at line 921 of file event-loop.c.

References async_signal_handlers_serial_event, async_signal_handler::ready, and serial_event_set().

Referenced by handle_sigfpe(), handle_sigint(), and handle_sigterm().

## ◆ start_event_loop()

void start_event_loop | ( | void |  | ) |

Definition at line 359 of file event-loop.c.

References after_char_processing_hook, async_enable_stdin(), CATCH, current_ui, END_CATCH, exception_print(), gdb_do_one_event(), gdb_stderr, observer_notify_command_error(), PROMPT_NEEDED, ui::prompt_state, RETURN_MASK_ALL, and TRY.

Referenced by captured_command_loop().