X-Spam-Check-By: sourceware.org Date: Thu, 15 Jun 2006 11:04:56 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: GDB Ctrl-C Interrupt Fails WORKAROUND Message-ID: <20060615150456.GA7830@trixie.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <37FD7E0C-3F61-4EB2-B5A2-9C86C87A45DA AT qualcomm DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <37FD7E0C-3F61-4EB2-B5A2-9C86C87A45DA@qualcomm.com> User-Agent: Mutt/1.5.11 Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: 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 On Thu, Jun 15, 2006 at 01:20:40AM -0700, Kyle McKay wrote: >On 15 Jun 2006 at 00:44:05 -0400 Christopher Faylor wrote: >>On Wed, Jun 14, 2006 at 08:29:50PM -0700, Kyle McKay wrote: >>>If you have ever tried to interrupt a program running under cygwin >>>gdb, you have probably experienced some frustration. Especially if >>>the program was built with -mno-cygwin. >> >>No I never have. In fact I often rely on CTRL-C interrupting the >>program. It doesn't matter whether the program is built with >>-mno-cygwin or not. In fact, I am sometimes frustrated when I >>actually >>want the CTRL-C to be propagated to the program but then I remember >>about the "handle" command. >> >>The only time that I can think of when a CTRL-C would not interrupt a >>program would be when you're running gdb under a cygwin pty or >>tty. But >>it's usually easy enough not to do that if you are debugging a >>problem. > >I'm happy for you that CTRL-C works for you. It does not work for me. > >I'm almost never running gdb from a genuine DOS command prompt. >Sometimes via ssh, sometimes via a terminal emulator. CTRL-C doesn't >work in those. > >Also, if you have "tty" in your CYGWIN variable it doesn't work even >from a DOS command prompt. Which is exactly what I theorized above. So, characterizing CTRL-C as not working in gdb is rather an overstatement without more details. Now you know that you can use a standard console window for debugging and all will be well. >Lacking the ability to interrupt a running program severely limits >gdb's usefulness. Fortunately there's a workaround available. Yep. Use a console window. cgf -- 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/