delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/06/15/04:29:08

X-Spam-Check-By: sourceware.org
Date: Thu, 15 Jun 2006 01:28:59 -0700
From: clayne AT anodized DOT com
To: cygwin AT cygwin DOT com
Subject: Re: GDB Ctrl-C Interrupt Fails WORKAROUND
Message-ID: <20060615082859.GB4457@ns1.anodized.com>
References: <E5AED0BA-EE62-4D97-96CE-8A96D0C0F559 AT qualcomm DOT com> <37FD7E0C-3F61-4EB2-B5A2-9C86C87A45DA AT qualcomm DOT com>
Mime-Version: 1.0
In-Reply-To: <37FD7E0C-3F61-4EB2-B5A2-9C86C87A45DA@qualcomm.com>
User-Agent: Mutt/1.5.11
X-Assp-Spam-Prob: 0.00000
X-Assp-Whitelisted: Yes
X-Assp-Envelope-From: clayne AT ns1 DOT anodized DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

On Thu, Jun 15, 2006 at 01:20:40AM -0700, Kyle McKay wrote:
> 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.

Same here.

> Finally, it NEVER works no matter what if you are debugging a program  
> built with a different compiler such as m$ visual C++.  And, of  
> course, you say I have no reason to do that since the debugging  
> symbols will not be compatible.  However, the m$ visual C++ built  
> program is then loading a cygwin/mingw built DLL.  CTRL-C doesn't  
> work in this case to interrupt the running program.  Although if you  
> are careful you can get breakpoints set, but if you change your mind  
> after you start running the program again then you're out of luck.   
> That's where the debugbreak utility comes in very handy.
> 
> Lacking the ability to interrupt a running program severely limits  
> gdb's usefulness.  Fortunately there's a workaround available.

I find it does it to me 100% of the time if I'm using putty+ssh or
putty+cygputty hack. There's no way I'm using the native cmd shell or
the default cygwin cmd shell. It's extremely frustrating when one realizes
they've just done a "d b", "c" and realize they have no ability to now
stop gdb or even stop anything without hitting up task manager and killing
the process.

BTW Kyle, you can extend your program greatly by using process enumeration
coupled with strcmp on the image name to find the pid based on a string and
automatically signal it. But honestly I don't think this program should be
needed in the first place.

-cl

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019