[RFA] Fix gdbserver queued packet handling
Pedro Alves
pedro@codesourcery.com
Mon May 3 20:41:00 GMT 2010
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
More information about the Gdb-patches
mailing list