This is the mail archive of the gdb-patches@sources.redhat.com 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: PATCH: S/390: don't try to read zero bytes



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!


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