diff options
-rw-r--r-- | gdb/main.c | 12 | ||||
-rw-r--r-- | gdb/utils.c | 2 |
2 files changed, 13 insertions, 1 deletions
@@ -410,6 +410,10 @@ start_event_loop () { result = gdb_do_one_event (); } + catch (const gdb_exception_forced_quit &ex) + { + throw; + } catch (const gdb_exception &ex) { exception_print (gdb_stderr, ex); @@ -518,6 +522,10 @@ catch_command_errors (catch_command_errors_const_ftype command, if (do_bp_actions) bpstat_do_actions (); } + catch (const gdb_exception_forced_quit &e) + { + quit_force (NULL, 0); + } catch (const gdb_exception &e) { return handle_command_errors (e); @@ -1309,6 +1317,10 @@ captured_main (void *data) { captured_command_loop (); } + catch (const gdb_exception_forced_quit &ex) + { + quit_force (NULL, 0); + } catch (const gdb_exception &ex) { exception_print (gdb_stderr, ex); diff --git a/gdb/utils.c b/gdb/utils.c index 91e6974..08cc41b 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -642,7 +642,7 @@ quit (void) if (sync_quit_force_run) { sync_quit_force_run = 0; - quit_force (NULL, 0); + throw_forced_quit ("SIGTERM"); } #ifdef __MSDOS__ |