aboutsummaryrefslogtreecommitdiff
path: root/gdb/bsd-kvm.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/bsd-kvm.c')
-rw-r--r--gdb/bsd-kvm.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/gdb/bsd-kvm.c b/gdb/bsd-kvm.c
index 36b33e9..fa7f83c 100644
--- a/gdb/bsd-kvm.c
+++ b/gdb/bsd-kvm.c
@@ -131,16 +131,28 @@ bsd_kvm_xfer_memory (CORE_ADDR addr, ULONGEST len,
return nbytes;
}
-static LONGEST
+static enum target_xfer_status
bsd_kvm_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 offset, ULONGEST len, ULONGEST *xfered_len)
{
switch (object)
{
case TARGET_OBJECT_MEMORY:
- return bsd_kvm_xfer_memory (offset, len, readbuf, writebuf);
+ {
+ LONGEST ret = bsd_kvm_xfer_memory (offset, len, readbuf, writebuf);
+
+ if (ret < 0)
+ return TARGET_XFER_E_IO;
+ else if (ret == 0)
+ return TARGET_XFER_EOF;
+ else
+ {
+ *xfered_len = (ULONGEST) ret;
+ return TARGET_XFER_OK;
+ }
+ }
default:
return TARGET_XFER_E_IO;