aboutsummaryrefslogtreecommitdiff
path: root/gdb/linux-nat.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/linux-nat.c')
-rw-r--r--gdb/linux-nat.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index d144c77..ebf4055 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -3879,12 +3879,12 @@ linux_xfer_siginfo (struct target_ops *ops, enum target_object object,
pid = ptid_get_pid (inferior_ptid);
if (offset > sizeof (siginfo))
- return -1;
+ return TARGET_XFER_E_IO;
errno = 0;
ptrace (PTRACE_GETSIGINFO, pid, (PTRACE_TYPE_ARG3) 0, &siginfo);
if (errno != 0)
- return -1;
+ return TARGET_XFER_E_IO;
/* When GDB is built as a 64-bit application, ptrace writes into
SIGINFO an object with 64-bit layout. Since debugging a 32-bit
@@ -3909,7 +3909,7 @@ linux_xfer_siginfo (struct target_ops *ops, enum target_object object,
errno = 0;
ptrace (PTRACE_SETSIGINFO, pid, (PTRACE_TYPE_ARG3) 0, &siginfo);
if (errno != 0)
- return -1;
+ return TARGET_XFER_E_IO;
}
return len;
@@ -4219,7 +4219,7 @@ linux_proc_xfer_spu (struct target_ops *ops, enum target_object object,
if (!annex)
{
if (!readbuf)
- return -1;
+ return TARGET_XFER_E_IO;
else
return spu_enumerate_spu_ids (pid, readbuf, offset, len);
}
@@ -4227,7 +4227,7 @@ linux_proc_xfer_spu (struct target_ops *ops, enum target_object object,
xsnprintf (buf, sizeof buf, "/proc/%d/fd/%s", pid, annex);
fd = gdb_open_cloexec (buf, writebuf? O_WRONLY : O_RDONLY, 0);
if (fd <= 0)
- return -1;
+ return TARGET_XFER_E_IO;
if (offset != 0
&& lseek (fd, (off_t) offset, SEEK_SET) != (off_t) offset)