This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
gdbserver/win32, fix ctrl-c handling.
- From: Pedro Alves <pedro at codesourcery dot com>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Thu, 26 Nov 2009 22:28:04 +0000
- Subject: gdbserver/win32, fix ctrl-c handling.
Sometimes, a win32 gdbserver would ignore a ctrl-c, because
this
remote-utils.c:input_interrupt:
if (cc != 1 || c != '\003' || current_inferior == NULL)
{
fprintf (stderr, "input_interrupt, count = %d c = %d ('%c')\n",
cc, c, c);
return;
}
was being reached with current_inferior == NULL. current_inferior
ends up set to NULL after a EXIT_THREAD_DEBUG_EVENT event. Between
a thread exit event and any other event that forced a curren_inferiot
switch, ctrl-c's where ignored. I've applied this patch to handle it
like linux-low.c does. When a thread exits, switch to any thread
other thread (always the first in the thread list, just because it's
simple and handy).
--
Pedro Alves