void gdb_call_async_signal_handler (struct async_signal_handler *handler, int immediate_p) { if (immediate_p) call_async_signal_handler (handler); else mark_async_signal_handler (handler); }
/* Quit GDB if SIGTERM is received. GDB would quit anyway, but this way it will clean up properly. */ void handle_sigterm (int sig) { signal (sig, handle_sigterm); sync_quit_force_run = 1; set_quit_flag (); mark_async_signal_handler (async_sigterm_token); }
void gdb_call_async_signal_handler (struct async_signal_handler *handler, int immediate_p) { if (immediate_p) sigint_handler = handler; else { mark_async_signal_handler (handler); sigint_handler = NULL; } SetEvent (sigint_event); }
void handle_sigint (int sig) { signal (sig, handle_sigint); /* We could be running in a loop reading in symfiles or something so it may be quite a while before we get back to the event loop. So set quit_flag to 1 here. Then if QUIT is called before we get to the event loop, we will unwind as expected. */ set_quit_flag (); /* In case nothing calls QUIT before the event loop is reached, the event loop handles it. */ mark_async_signal_handler (sigint_token); }
/* Quit GDB if SIGTERM is received. GDB would quit anyway, but this way it will clean up properly. */ void handle_sigterm (int sig) { signal (sig, handle_sigterm); /* Call quit_force in a signal safe way. quit_force itself is not signal safe. */ if (target_can_async_p ()) mark_async_signal_handler (async_sigterm_token); else { sync_quit_force_run = 1; set_quit_flag (); } }
/* Tell the event loop what to do if SIGFPE is received. See event-signal.c. */ static void handle_sigfpe (int sig) { mark_async_signal_handler (sigfpe_token); signal (sig, handle_sigfpe); }
void handle_stop_sig (int sig) { mark_async_signal_handler (sigtstp_token); signal (sig, handle_stop_sig); }
/* Tell the event loop what to do if SIGHUP is received. See event-signal.c. */ static void handle_sighup (int sig) { mark_async_signal_handler (sighup_token); signal (sig, handle_sighup); }
/* Tell the event loop what to do if SIGQUIT is received. See event-signal.c. */ static void handle_sigquit (int sig) { mark_async_signal_handler (sigquit_token); signal (sig, handle_sigquit); }
void mark_async_signal_handler_wrapper (void *token) { mark_async_signal_handler ((struct async_signal_handler *) token); }