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
> Date: Mon, 20 Aug 2007 15:31:28 -0400
> From: Daniel Jacobowitz <drow@false.org>
> Cc: Roland.Puntaier@br-automation.com, gdb@sourceware.org
>
> On Mon, Aug 20, 2007 at 10:16:12PM +0300, Eli Zaretskii wrote:
> > The way to fix this is to make the signal handler stop the main thread
> > as the first thing it does. Then you have a Posix-compliant program
> > again. I did something similar for the MinGW port of GNU Make.
>
> Is there any way to force the other thread to longjmp? Otherwise,
> just stopping it isn't enough - you don't have the right stack.
longjmp should (theoretically) handle this allright. But if not, you
could raise a flag in the signal handler, then resume the main thread
and return, and the main thread could check the flag and longjmp.