* 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.
This commit is contained in:
Jim Blandy
2001-12-20 08:50:47 +00:00
parent 2e7db62a77
commit c5e243bbc4
2 changed files with 9 additions and 2 deletions

View File

@@ -132,8 +132,11 @@ s390_readinstruction (bfd_byte instr[], CORE_ADDR at,
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;
if (instrlen > 2)
{
if ((*info->read_memory_func) (at + 2, &instr[2], instrlen - 2, info))
return -1;
}
return instrlen;
}