PATCH: S/390: don't try to read zero bytes

Jim Blandy jimb@zwingli.cygnus.com
Thu Dec 20 12:57:00 GMT 2001


Andrew Cagney <ac131313@cygnus.com> writes:
> > 2001-12-20  Jim Blandy  <jimb@redhat.com>
> > 
> > * s390-tdep.c (s390_readinstruction): Don't call
> > 	info->read_memory_func to read zero bytes.  Some targets'
> > 	xfer_memory functions can't cope with that.
> > 
> 
> 
> Jim, which?
> 
> While slightly stupid, the target should be able to handle that.

Oh, wait, I understand now.

A target's to_xfer_memory function is supposed to return the number of
bytes transferred, or zero if it can't transfer the bytes.  If you
make a zero-length request, there's no way for it to indicate success.
D'oh!



More information about the Gdb-patches mailing list