aboutsummaryrefslogtreecommitdiff
path: root/gdb/top.c
diff options
context:
space:
mode:
authorDawn Perchik <dawn@cygnus>1997-02-12 10:27:11 +0000
committerDawn Perchik <dawn@cygnus>1997-02-12 10:27:11 +0000
commit16a43bf443c8e2ab7fc9d35e131d6a3d773149b6 (patch)
tree9b78fdc456dfb492e00d1f10f97c26b4d647e469 /gdb/top.c
parent6fb47af03652d5d32a4d46f91a7f3771d0aecdbd (diff)
downloadgdb-16a43bf443c8e2ab7fc9d35e131d6a3d773149b6.zip
gdb-16a43bf443c8e2ab7fc9d35e131d6a3d773149b6.tar.gz
gdb-16a43bf443c8e2ab7fc9d35e131d6a3d773149b6.tar.bz2
* 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.
Diffstat (limited to 'gdb/top.c')
-rw-r--r--gdb/top.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gdb/top.c b/gdb/top.c
index 2e1098c..3afa8c9 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -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);
}