Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Pedro Alves <pedro@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: generic `struct serial' interface pipe for remote non-stop
Date: Sat, 18 Oct 2008 09:34:00 -0000	[thread overview]
Message-ID: <uljwml02f.fsf@gnu.org> (raw)
In-Reply-To: <200810172154.50092.pedro@codesourcery.com>

> 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.


      reply	other threads:[~2008-10-18  9:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-16 23:35 Pedro Alves
2008-10-17 10:22 ` Eli Zaretskii
2008-10-17 20:55   ` Pedro Alves
2008-10-18  9:34     ` Eli Zaretskii [this message]

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=uljwml02f.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@codesourcery.com \
    /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