Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: gdbserver/win32, fix ctrl-c handling.
Date: Thu, 26 Nov 2009 22:28:00 -0000	[thread overview]
Message-ID: <200911262228.04610.pedro@codesourcery.com> (raw)

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


             reply	other threads:[~2009-11-26 22:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-26 22:28 Pedro Alves [this message]
2009-11-26 22:30 ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200911262228.04610.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox