+2008-01-23 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * remote.c (remote_wait): Handle SIGINT between packets.
+ (remote_async_wait): Likewise.
+
2008-01-23 Vladimir Prus <vladimir@codesourcery.com>
Chris Demetriou <cgd@google.com>
char *buf, *p;
ofunc = signal (SIGINT, remote_interrupt);
+ /* If the user hit C-c before this packet, or between packets,
+ pretend that it was hit right here. */
+ if (quit_flag)
+ {
+ quit_flag = 0;
+ remote_interrupt (SIGINT);
+ }
getpkt (&rs->buf, &rs->buf_size, 1);
signal (SIGINT, ofunc);
char *buf, *p;
if (!target_is_async_p ())
- ofunc = signal (SIGINT, remote_interrupt);
+ {
+ ofunc = signal (SIGINT, remote_interrupt);
+ /* If the user hit C-c before this packet, or between packets,
+ pretend that it was hit right here. */
+ if (quit_flag)
+ {
+ quit_flag = 0;
+ remote_interrupt (SIGINT);
+ }
+ }
/* FIXME: cagney/1999-09-27: If we're in async mode we should
_never_ wait for ever -> test on target_is_async_p().
However, before we do that we need to ensure that the caller