info->read_memory_func to read zero bytes. Some targets'
xfer_memory functions can't cope with that.
2001-12-19 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.
+
* gdbarch.sh (TARGET_CHAR_SIGNED): New macro.
* gdbarch.c, gdbarch.h: Regenerated.
* gdbtypes.c (build_gdbtypes): If TARGET_CHAR_SIGNED is zero,
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;
}