This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: gdb-6.6 mingw port hangs after Ctrl-C
On Mon, Aug 20, 2007 at 05:49:53PM +0200, Roland Puntaier wrote:
> Dear GDB community,
>
> With cygwin GDB I used to abandon the remote target by twice typing
> Ctrl-C.
>
> I would like to switch to the gdb-6.6 mingw port, because that does not
> need any cygwin dlls.
> But here I ran into a hang:
>
> (gdb) c
> Continuing.
> <twice Ctrl-C goes here>
> Interrupted while waiting for the program.
> Give up (and stop debugging it)? (y or n) y
> <hang>
>
> Maybe someone with a better understanding of gdb sources can give me a
> hint on how to overcome this issue.
Some of us at CodeSourcery keep trying to fix this, but no luck so
far. Control-C handling on Windows is completely different from on
POSIX operating systems, because the handler runs in a new thread
instead of interrupting the main thread of execution. This means
that GDB's signal handling, which relies on longjmp, does not work.
> I've tried to debug into gdb, but the Ctrl-C is intercepted by the GDB I
> use to debug. (Any Idea how I can make GDB stop intercepting Ctrl-C?)
You can try "signal SIGINT pass nostop noprint", but I don't think it
will work right on Windows.
--
Daniel Jacobowitz
CodeSourcery