diff options
Diffstat (limited to 'gdb/top.c')
-rw-r--r-- | gdb/top.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1761,8 +1761,6 @@ quit_force (int *exit_arg, int from_tty) { int exit_code = 0; - undo_terminal_modifications_before_exit (); - /* An optional expression may be used to cause gdb to terminate with the value of that expression. */ if (exit_arg) @@ -1770,6 +1768,10 @@ quit_force (int *exit_arg, int from_tty) else if (return_child_result) exit_code = return_child_result_value; + gdb::observers::gdb_exiting.notify (exit_code); + + undo_terminal_modifications_before_exit (); + /* We want to handle any quit errors and exit regardless. */ /* Get out of tfind mode, and kill or detach all inferiors. */ |