delorie.com/archives/browse.cgi | search |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <45E61B10.4080208@portugalmail.pt> |
Date: | Thu, 01 Mar 2007 00:15:12 +0000 |
From: | Pedro Alves <pedro_alves AT portugalmail DOT pt> |
User-Agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.8.0.9) Gecko/20061207 Thunderbird/1.5.0.9 Mnenhy/0.7.4.0 |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: GDB Ctrl-C Interrupt Fails WORKAROUND |
References: | <E5AED0BA-EE62-4D97-96CE-8A96D0C0F559 AT qualcomm DOT com> <37FD7E0C-3F61-4EB2-B5A2-9C86C87A45DA AT qualcomm DOT com> <20060615150456 DOT GA7830 AT trixie DOT casa DOT cgf DOT cx> <20070228234326 DOT GD9444 AT ns1 DOT anodized DOT com> |
In-Reply-To: | <20070228234326.GD9444@ns1.anodized.com> |
X-Antivirus: | avast! (VPS 000719-0, 28-02-2007), Outbound message |
X-Antivirus-Status: | Clean |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Christopher Layne escreveu: > On Thu, Jun 15, 2006 at 11:04:56AM -0400, Christopher Faylor wrote: >>> 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. >> Is there a reason DebugBreakProcess can't be used from inside gdb if sending a ctrl-c with GenerateConsoleCtrlEvent (CTRL_C_EVENT, pid) doesn't work? > > Where in the cygwin source tree would the best place be to look for > where SIGINT handling is being done at the tty/pty level so that I can > remove this pointless limitation from my builds? > See gdb/win32-nat.c:win32_stop and also: http://sourceware.org/ml/gdb-patches/2007-02/msg00294.html Look for win32_send_signal in the patch. Note that DebugBreakProcess only exists on XP or Windows 2003 server onwards. For WinNT < XP, it should be possible to simulate it with CreateRemoteThread with entry point set to DebugBreak or something similar. The worst case would be that a dll would have to be injected to load a function that does the DebugBreak in the debuggee's address space. Cheers, Pedro Alves -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |