mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 01:07:52 +00:00
* defs.h: Fix cntl-C to read from the Windows message queue.
Add prototypes for make_final_cleanup (and the other cleanup routines. * remote-e7000.c: Fix sync code to timeout if unable to sync. Change sync code to report status while trying to sync-up with hardware. Add debugging output and document. * ser-e7kpc.c: Swap order of len & offset to match implementation. Add debugging output and document. * serial.c: Add debugging output. * top.c: Add call to do_final_cleanups. Remove conditionals preventing Win32 from getting SIGQUIT. * utils.c: (*_cleanup): Modify cleanup routines to accept a cleanup chain as a parameter. Extract this generic code from the cleanup routines into separate funtions (*_my_cleanup). Keep old functionality by passing "cleanup_chain" to the new funtions. Define the cleanup chain "final_cleanup_chain" to be a cleanup chain which will be executed only when gdb exits. Add functions (*_final_cleanup) to match the original (*_cleanup) functions. (pollquit, quit, notice_quit): Fix to read cntl-C from the Windows message queue.
This commit is contained in:
@@ -571,7 +571,6 @@ catch_errors (func, args, errstring, mask)
|
||||
|
||||
/* Handler for SIGHUP. */
|
||||
|
||||
#ifndef _WIN32
|
||||
static void
|
||||
disconnect (signo)
|
||||
int signo;
|
||||
@@ -581,7 +580,6 @@ int signo;
|
||||
signal (SIGHUP, SIG_DFL);
|
||||
kill (getpid (), SIGHUP);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Just a little helper function for disconnect(). */
|
||||
|
||||
@@ -1899,11 +1897,9 @@ init_signals ()
|
||||
might be in memory, shared between the two). Since we establish
|
||||
a handler for SIGQUIT, when we call exec it will set the signal
|
||||
to SIG_DFL for us. */
|
||||
#ifndef _WIN32
|
||||
signal (SIGQUIT, do_nothing);
|
||||
if (signal (SIGHUP, do_nothing) != SIG_IGN)
|
||||
signal (SIGHUP, disconnect);
|
||||
#endif
|
||||
signal (SIGFPE, float_handler);
|
||||
|
||||
#if defined(SIGWINCH) && defined(SIGWINCH_HANDLER)
|
||||
@@ -2856,6 +2852,8 @@ quit_command (args, from_tty)
|
||||
if (write_history_p && history_filename)
|
||||
write_history (history_filename);
|
||||
|
||||
do_final_cleanups(ALL_CLEANUPS); /* Do any final cleanups before exiting */
|
||||
|
||||
exit (exit_code);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user