From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26315 invoked by alias); 24 Apr 2010 01:58:02 -0000 Received: (qmail 26240 invoked by uid 22791); 24 Apr 2010 01:58:01 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00 X-Spam-Check-By: sourceware.org Received: from az33egw02.freescale.net (HELO az33egw02.freescale.net) (192.88.158.103) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 24 Apr 2010 01:57:56 +0000 Received: from az33smr01.freescale.net (az33smr01.freescale.net [10.64.34.199]) by az33egw02.freescale.net (8.14.3/az33egw02) with ESMTP id o3O1vWJo029592; Fri, 23 Apr 2010 18:57:32 -0700 (MST) Received: from suki.freescale.com (mvp-10-214-73-35.am.freescale.net [10.214.73.35]) by az33smr01.freescale.net (8.13.1/8.13.0) with ESMTP id o3O25jIi000733; Fri, 23 Apr 2010 21:05:47 -0500 (CDT) Message-Id: <201004240205.o3O25jIi000733@az33smr01.freescale.net> Date: Sat, 24 Apr 2010 01:58:00 -0000 To: Pedro Alves , gdb@sourceware.org From: John Cortell Subject: Re: sending CTRL-C to Cygwin gdb 6.8 has no effect Cc: Joel Brobecker In-Reply-To: <201004240209.55478.pedro@codesourcery.com> References: <201004231941.o3NJfbWR021914@az33smr01.freescale.net> <20100423201109.GQ13204@adacore.com> <201004232035.o3NKZA8B006004@az33smr01.freescale.net> <201004240209.55478.pedro@codesourcery.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-04/txt/msg00119.txt.bz2 At 08:09 PM 4/23/2010, Pedro Alves wrote: >On Friday 23 April 2010 21:25:10, John Cortell wrote: > > cmdline? I.e., if the user hitting CTRL-C in a Windows shell gdb > > session successfully interrupts the target program, why is sending > > the CTRL-C programatically not working? Any thoughts there? > >In the latter case, is GDB sharing a console with the inferior? >If not sharing a console (native debugging, that is), newer GDB's >that postdate that patch Joel pointed you at, will catch the >CTRL_C_EVENT themselves, and still try to interrupt the inferior >with DebugBreakProcess. Older GDB's, like 6.8, do nothing. I'm not sure I explained myself correctly. When I said sending CTRL-C programatically is not working, I meant, we're sending *gdb* the CTRL-C and that's not working; it has no effect. The expected behavior is that the inferior get interrupted and gdb takes control. Based on your comment, I believe you think we're sending the CTRL-C to the inferior. We do that as a fallback, and that does indeed work, but it's not an ideal solution. If nothing, we end up having to special case for cygwin 6.8, which is messy. So, back to my question. If I'm able to manually do a CTRL-C within a cygwin 6.8 gdb session running in a Windows command shell, and it works, why doesn't it work when we (CDT) programatically send the gdb process we launched the CTRL-C. That's the mystery at hand. I suspect if we get an answer to that, it may help us address a range of issues related to interrupting gdb on Windows. >With remote debugging, I think sending a ctrl-c to >GDB should work, even in 6.8 (provided there's a console >and GDB does get the CTRL_C_EVENT, or if this is a cygwin gdb, >you sent it a real SIGINT signal). Did you try it? > >-- >Pedro Alves