This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: generic `struct serial' interface pipe for remote non-stop
> From: Pedro Alves <pedro@codesourcery.com>
> Date: Fri, 17 Oct 2008 21:54:49 +0100
>
> - Since async signal handlers are always checked before polling the
> file descriptors, I can easily starve the file descriptor based
> sources. E.g., if I place several threads displace stepping a
> breakpoint, forcing continuous remote traffic, the CLI becomes very,
> very unresponsive, unusable really. This is because stdin itself
> is registered as a monitored (via select/poll) file descriptor.
>
> To solve this, I adjusted the event loop to give equal priority to
> all event-sources (timers, async signal handlers, monitored file
> descriptors). The async signal handling was changed to instead
> of immediatelly calling the associated callback, it installs an
> event in the "ready" queue, just like the file-descriptor and
> timer based sources. I then make sure that I poll each of the
> possible event sources once (select/poll with timeout 0 too). If
> if no event is found ready, then, we go blocking waiting for one
> in select/poll.
>
> I can sucessfully debug a non-stop linux gdbserver from both
> a linux host and a Windows (mingw32) host with this.
>
> The remote.c changes below apply on top of the non-stop support
> patch I sent yesterday, and it's what I used to test, shown here
> so you could see what was required that change, in case you're
> curious about it.
>
> Do you think it is a better alternative?
Yes, this is much better, IMO. Thanks.