This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [patch/gdbserver] Handle early interrupts
- From: Daniel Jacobowitz <drow at false dot org>
- To: gdb-patches at sources dot redhat dot com
- Date: Sun, 29 Feb 2004 11:47:50 -0500
- Subject: Re: [patch/gdbserver] Handle early interrupts
- References: <20040228181359.GA16903@nevyn.them.org>
On Sat, Feb 28, 2004 at 01:13:59PM -0500, Daniel Jacobowitz wrote:
> This patch lets gdbserver start expecting control-C as soon as we begin
> resuming threads, instead of as soon as we begin waiting. On slow targets,
> especially if one of the threads is scheduled right after the PTRACE_CONT
> and before gdbserver has finished waking its siblings, there can be a long
> delay. Until this arbitrary, sometimes very long, delay has passed, any
> control-C sent by the client will be ignored. The easy solution is to
> enable, but block, SIGIO; then unblock it when we're ready and the OS
> will automatically deliver it then.
>
> Will commit in a little while. Tested on arm-linux using gdbserver
> (I've forgotten to mention that for the last few patches, but it's true of
> all of them).
> 2004-02-28 Daniel Jacobowitz <drow@mvista.com>
>
> * linux-low.c (linux_wait): Unblock async I/O.
> (linux_resume): Block and enable async I/O.
> * remote-utils.c (block_async_io, unblock_async_io): New functions.
> * server.h (block_async_io, unblock_async_io): Add prototypes.
Committed to HEAD.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer