[rfc] Allow xfer_partial to signal EOF out of band

Daniel Jacobowitz drow@false.org
Thu Jun 22 18:18:00 GMT 2006


On Thu, Jun 22, 2006 at 08:12:50PM +0200, Mark Kettenis wrote:
> > Date: Wed, 21 Jun 2006 23:36:09 -0400
> > From: Daniel Jacobowitz <drow@false.org>
> > 
> > This patch adds a mechanism for to_xfer_partial to signal that it's done.
> > I didn't implement the new mechanism for any other targets besides remote;
> > it could easily be done for e.g. procfs_read_auxv, but the turnaround time
> > is such that it's not a big deal either way.  For the remote protocol,
> > where there's an extra round trip to the remote link, I set *no_more if
> > the target tells me to.
> 
> I don't like this at all.  I think target_read_partial already has
> enough arguments.  And having read-like function calls return zero on
> EOF is a well-established practice.

OK.

> > Any comments on this?  Otherwise, I'll commit it after qXfer:auxv:read. 
> > This is the patch which actually saves one packet whenever a remote object
> > is transferred.
> 
> Does that really impact performance?  If it does, I think you should
> add some state to the remote protocol and use that to prevent it from
> sending a packet.

I haven't measured it; it just tickles my sense of the ridiculous to
waste the round trip.  I bet you're right and I can do this within the
remote protocol specific code fairly easily - I'll give that a try.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gdb-patches mailing list