Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* PATCH: S/390: don't try to read zero bytes
@ 2001-12-20  0:56 Jim Blandy
  2001-12-20  3:10 ` Andrew Cagney
  0 siblings, 1 reply; 5+ messages in thread
From: Jim Blandy @ 2001-12-20  0:56 UTC (permalink / raw)
  To: gdb-patches


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.

Index: gdb/s390-tdep.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/s390-tdep.c,v
retrieving revision 2.33
diff -c -r2.33 s390-tdep.c
*** gdb/s390-tdep.c	2001/12/20 03:25:51	2.33
--- gdb/s390-tdep.c	2001/12/20 07:41:37
***************
*** 132,139 ****
    if ((*info->read_memory_func) (at, &instr[0], 2, info))
      return -1;
    instrlen = s390_instrlen[instr[0] >> 6];
!   if ((*info->read_memory_func) (at + 2, &instr[2], instrlen - 2, info))
!     return -1;
    return instrlen;
  }
  
--- 132,142 ----
    if ((*info->read_memory_func) (at, &instr[0], 2, info))
      return -1;
    instrlen = s390_instrlen[instr[0] >> 6];
!   if (instrlen > 2)
!     {
!       if ((*info->read_memory_func) (at + 2, &instr[2], instrlen - 2, info))
!         return -1;
!     }
    return instrlen;
  }
  


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-12-23  9:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-20  0:56 PATCH: S/390: don't try to read zero bytes Jim Blandy
2001-12-20  3:10 ` Andrew Cagney
2001-12-20 12:53   ` Jim Blandy
2001-12-20 12:57   ` Jim Blandy
2001-12-23  1:44     ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox