This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Can I use -exec-interrupt to stop the inferior program?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]