Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* gdbserver/win32, fix ctrl-c handling.
@ 2009-11-26 22:28 Pedro Alves
  2009-11-26 22:30 ` Pedro Alves
  0 siblings, 1 reply; 2+ messages in thread
From: Pedro Alves @ 2009-11-26 22:28 UTC (permalink / raw)
  To: gdb-patches

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-11-26 22:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-26 22:28 gdbserver/win32, fix ctrl-c handling Pedro Alves
2009-11-26 22:30 ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox