X-Spam-Check-By: sourceware.org Message-ID: <2284342f0603170055i5268807bn83042ea5988aa46@mail.gmail.com> Date: Fri, 17 Mar 2006 03:55:08 -0500 From: "Doug Bohl" To: cygwin AT cygwin DOT com Subject: GDB Interrupts on Cygwin MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Disposition: inline X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id k2H8tIs7007047 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 code. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/