This is the mail archive of the
mailing list for the Cygwin project.
GDB Interrupts on Cygwin
- From: "Doug Bohl" <douglas dot bohl at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Fri, 17 Mar 2006 03:55:08 -0500
- Subject: GDB Interrupts on Cygwin
When running a Windows application from GDB, GDB gives control to the
application at a certain point. It would be nice to, at an arbitrary
time, suspend the application and give control back to GDB. I know
that I can set breakpoints, but sometimes I don't know exactly when I
want to break until after I'm running the application. Ctrl-C
supposedly sends the SIGINT signal to GDB, breaking the running
application and restoring control to GDB. However, this does not
appear to work, at least not on Cygwin.
I've tried /bin/kill -f -s SIGINT pid. Sending SIGINT, or in fact any
other signal, simply terminates the Windows application.
I even wrote a simple program to suspend the Windows application at my
command using the Win32 API function SuspendThread. While the program
does indeed suspend, GDB remains locked.
Perhaps there is some way to, using the Windows API, simulate a SIGINT
signal, or another signal to break the program (perhaps SIGSEGV would
be easiest). Perhaps GDB could be modified in some way--it could map
Windows messages to UNIX signals. Or maybe it could look for
keystrokes using Windows hooks rather than its current method (I'm not
even entirely sure what its current method is). If anyone thinks any
of these methods would be feasible, I would be happy to contribute
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html