From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7394 invoked by alias); 11 Oct 2006 13:49:24 -0000 Received: (qmail 7380 invoked by uid 22791); 11 Oct 2006 13:49:23 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Wed, 11 Oct 2006 13:49:18 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1GXeSS-0006kJ-5n; Wed, 11 Oct 2006 09:49:16 -0400 Date: Wed, 11 Oct 2006 13:49:00 -0000 From: Daniel Jacobowitz To: Nikolay Molchanov Cc: gdb@sourceware.org Subject: Re: Can I use -exec-interrupt to stop the inferior program? Message-ID: <20061011134916.GA25745@nevyn.them.org> Mail-Followup-To: Nikolay Molchanov , gdb@sourceware.org References: <452C936F.2080704@sun.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <452C936F.2080704@sun.com> User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-10/txt/msg00062.txt.bz2 On Tue, Oct 10, 2006 at 11:47:11PM -0700, Nikolay Molchanov wrote: > Nick Roberts suggested to use signals to implement "interrupt" action, > and it really works very well on Unix (Solaris and Linux), but unfortunately > it does not work properly on Windows. If I send SIGTSTP, gdb does not > show that the program is stopped (and it really does not stop), so it looks > like this signal is ignored. If I send SIGINT, the program is really > interrupted, > but it seems to cause SIGSEGV (Segmentation Fault), and there is no way > to continue the debugging. Here is a scenario (I use Cygwin): You should be using SIGINT for this, yes. Windows SIGINT is funny, but if you're dealing with Cygwin, it should be OK - in theory. It doesn't work for me either; I get the program exiting with code 01000, instead of a segfault, but the result is equally useless. Maybe this is a bug in Cygwin? Eventually, you'll be able to do this properly in GDB. Nick has been working hard on asynchronous operation, and once that's ready, we can implement the -exec-interrupt operation using Windows API calls. In the mean time, I have no idea. -- Daniel Jacobowitz CodeSourcery