/* NOTE: 1999-04-30 This is the asynchronous version of the command_loop function. The command_loop function will be obsolete when we switch to use the event loop at every execution of gdb. */ static void command_handler (char *command) { int stdin_is_tty = ISATTY (stdin); struct cleanup *stat_chain; clear_quit_flag (); if (instream == stdin && stdin_is_tty) reinitialize_more_filter (); /* If readline returned a NULL command, it means that the connection with the terminal is gone. This happens at the end of a testsuite run, after Expect has hung up but GDB is still alive. In such a case, we just quit gdb killing the inferior program too. */ if (command == 0) { printf_unfiltered ("quit\n"); execute_command ("quit", stdin == instream); } stat_chain = make_command_stats_cleanup (1); execute_command (command, instream == stdin); /* Do any commands attached to breakpoint we stopped at. */ bpstat_do_actions (); do_cleanups (stat_chain); }
void command_handler (char *command) { struct cleanup *stat_chain; char *c; clear_quit_flag (); if (instream == stdin) reinitialize_more_filter (); stat_chain = make_command_stats_cleanup (1); /* Do not execute commented lines. */ for (c = command; *c == ' ' || *c == '\t'; c++) ; if (c[0] != '#') { execute_command (command, instream == stdin); /* Do any commands attached to breakpoint we stopped at. */ bpstat_do_actions (); } do_cleanups (stat_chain); }
void throw_exception (struct gdb_exception exception) { clear_quit_flag (); immediate_quit = 0; do_cleanups (all_cleanups ()); /* Jump to the containing catch_errors() call, communicating REASON to that call via setjmp's return value. Note that REASON can't be zero, by definition in defs.h. */ exceptions_state_mc (CATCH_THROWING); *current_catcher->exception = exception; EXCEPTIONS_SIGLONGJMP (current_catcher->buf, exception.reason); }
void prepare_to_throw_exception (void) { clear_quit_flag (); immediate_quit = 0; }