This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Fix gdbserver queued packet handling
- From: Pedro Alves <pedro at codesourcery dot com>
- To: Doug Evans <dje at google dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 3 May 2010 21:41:36 +0100
- Subject: Re: [RFA] Fix gdbserver queued packet handling
- References: <20100430171731.5600984398@ruffy.mtv.corp.google.com> <201004301855.12464.pedro@codesourcery.com> <AANLkTikcoyGrTjyg2qk2stIVQ2pymhD-_mxUc3xcVfAx@mail.gmail.com>
On Monday 03 May 2010 20:53:14, Doug Evans wrote:
> P.S. IWBN if one didn't have to continually keep bringing stuff over
> from gdb. Wouldn't it be nice if one could just include an
> event-loop.h (or some such) and use it. I'm developing the feeling
> that this is another instance where IWBN if gdb and gdbserver could
> share code.
Yes, of course I agree.
> 2010-05-03 Doug Evans <dje@google.com>
>
> * event-loop.c (struct callback_event): New struct.
...
This is okay too. Thank you for fixing this.
> +/* If there is still data in the buffer, queue another event to process it,
> + we can't sleep in select yet.
> + If there is no data left in the buffer, delete any pending callback. */
This last sentence appears stale.
> +static void
> +reschedule (void)
> +{
> + if (readchar_bufcnt > 0 && readchar_callback == NOT_SCHEDULED)
> + {
> + readchar_callback = append_callback_event (process_remaining, NULL);
> + }
> }
--
Pedro Alves