This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Fix gdbserver queued packet handling


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]