aboutsummaryrefslogtreecommitdiff
path: root/gdb/target.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/target.c')
-rw-r--r--gdb/target.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/gdb/target.c b/gdb/target.c
index 559ae0c..7279359 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -1787,9 +1787,9 @@ target_xfer_partial (struct target_ops *ops,
return retval;
}
-/* Read LEN bytes of target memory at address MEMADDR, placing the results in
- GDB's memory at MYADDR. Returns either 0 for success or an errno value
- if any error occurs.
+/* Read LEN bytes of target memory at address MEMADDR, placing the
+ results in GDB's memory at MYADDR. Returns either 0 for success or
+ a target_xfer_error value if any error occurs.
If an error occurs, no guarantee is made about the contents of the data at
MYADDR. In particular, the caller should not depend upon partial reads
@@ -1808,7 +1808,7 @@ target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
myaddr, memaddr, len) == len)
return 0;
else
- return EIO;
+ return TARGET_XFER_E_IO;
}
/* Like target_read_memory, but specify explicitly that this is a read from
@@ -1825,13 +1825,14 @@ target_read_stack (CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
myaddr, memaddr, len) == len)
return 0;
else
- return EIO;
+ return TARGET_XFER_E_IO;
}
/* Write LEN bytes from MYADDR to target memory at address MEMADDR.
- Returns either 0 for success or an errno value if any error occurs.
- If an error occurs, no guarantee is made about how much data got written.
- Callers that can deal with partial writes should call target_write. */
+ Returns either 0 for success or a target_xfer_error value if any
+ error occurs. If an error occurs, no guarantee is made about how
+ much data got written. Callers that can deal with partial writes
+ should call target_write. */
int
target_write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr, ssize_t len)
@@ -1843,14 +1844,14 @@ target_write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr, ssize_t len)
myaddr, memaddr, len) == len)
return 0;
else
- return EIO;
+ return TARGET_XFER_E_IO;
}
/* Write LEN bytes from MYADDR to target raw memory at address
- MEMADDR. Returns either 0 for success or an errno value if any
- error occurs. If an error occurs, no guarantee is made about how
- much data got written. Callers that can deal with partial writes
- should call target_write. */
+ MEMADDR. Returns either 0 for success or a target_xfer_error value
+ if any error occurs. If an error occurs, no guarantee is made
+ about how much data got written. Callers that can deal with
+ partial writes should call target_write. */
int
target_write_raw_memory (CORE_ADDR memaddr, const gdb_byte *myaddr, ssize_t len)
@@ -1862,7 +1863,7 @@ target_write_raw_memory (CORE_ADDR memaddr, const gdb_byte *myaddr, ssize_t len)
myaddr, memaddr, len) == len)
return 0;
else
- return EIO;
+ return TARGET_XFER_E_IO;
}
/* Fetch the target's memory map. */
@@ -2440,7 +2441,7 @@ get_target_memory (struct target_ops *ops, CORE_ADDR addr, gdb_byte *buf,
for this target). */
if (target_read (ops, TARGET_OBJECT_RAW_MEMORY, NULL, buf, addr, len)
!= len)
- memory_error (EIO, addr);
+ memory_error (TARGET_XFER_E_IO, addr);
}
ULONGEST