+ if (res <= 0)
+ return TARGET_XFER_E_IO;
+ else
+ {
+ *xfered_len = (ULONGEST) res;
+ return TARGET_XFER_OK;
+ }
+}
+
+/* Target to_xfer_partial implementation. */
+
+static enum target_xfer_status
+monitor_xfer_partial (struct target_ops *ops, enum target_object object,
+ const char *annex, gdb_byte *readbuf,
+ const gdb_byte *writebuf, ULONGEST offset, ULONGEST len,
+ ULONGEST *xfered_len)
+{
+ switch (object)
+ {
+ case TARGET_OBJECT_MEMORY:
+ return monitor_xfer_memory (readbuf, writebuf, offset, len, xfered_len);
+
+ default:
+ return TARGET_XFER_E_IO;
+ }