This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Can I use -exec-interrupt to stop the inferior program?
- From: Daniel Jacobowitz <drow at false dot org>
- To: Nikolay Molchanov <Nikolay dot Molchanov at Sun dot COM>
- Cc: gdb at sourceware dot org
- Date: Wed, 11 Oct 2006 09:49:16 -0400
- Subject: Re: Can I use -exec-interrupt to stop the inferior program?
- References: <452C936F.2080704@sun.com>
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