Re: [PATCH 0/2] Better handling of slow remote transfers

Gary Benson
2015-08-12T13:29:55Z

Pedro Alves wrote:
> On 08/12/2015 01:32 PM, Gary Benson wrote:
> > Pedro Alves wrote:
> > > I was only OK with trying to make transfers interruptible in the
> > > branch assuming it was something non-invasive, like a missing
> > > QUIT here and there.
> >
> > No, gdbserver sends the data in PBUFSIZ chunks, but GDB reads the
> > data a character at a time.
>
> Can you expand on this? What code is it that reads the data a
> character at a time? What data is gdb getting at when it does that?

getpkt_or_notif_sane_1 in gdb/remote.c. If I'm reading it right GDB
is reading every single byte coming over RSP individually. It doesn't
work to put a QUIT in there as there's still stuff coming over the
wire. If gdbserver sends data, GDB has to read it.

You're way more familiar with RSP than I am. Do you know any way to
make vFile:pread: interruptible?

Cheers,
Gary

--