aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/gdbserver/ChangeLog5
-rw-r--r--gdb/gdbserver/linux-mips-low.c1
-rw-r--r--gdb/mips-linux-nat.c1
4 files changed, 12 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d4166233495..ad1a87b7821 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2014-09-03 James Hogan <james.hogan@imgtec.com>
+
+ * mips-linux-nat.c (mips_linux_read_description): Reset errno to 0
+ prior to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
+
2014-09-03 Sergio Durigan Junior <sergiodj@redhat.com>
PR python/16699
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index a47ef492293..3fb143c2cb3 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,8 @@
+2014-09-03 James Hogan <james.hogan@imgtec.com>
+
+ * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
+ to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
+
2014-09-03 Gary Benson <gbenson@redhat.com>
* linux-x86-low.c (x86_linux_prepare_to_resume): Use
diff --git a/gdb/gdbserver/linux-mips-low.c b/gdb/gdbserver/linux-mips-low.c
index 1b2160b3537..377284be542 100644
--- a/gdb/gdbserver/linux-mips-low.c
+++ b/gdb/gdbserver/linux-mips-low.c
@@ -128,6 +128,7 @@ mips_read_description (void)
{
int pid = lwpid_of (current_inferior);
+ errno = 0;
ptrace (PTRACE_PEEKUSER, pid, DSP_CONTROL, 0);
switch (errno)
{
diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
index 88faa1edf69..ffc8411ca3b 100644
--- a/gdb/mips-linux-nat.c
+++ b/gdb/mips-linux-nat.c
@@ -439,6 +439,7 @@ mips_linux_read_description (struct target_ops *ops)
if (tid == 0)
tid = ptid_get_pid (inferior_ptid);
+ errno = 0;
ptrace (PTRACE_PEEKUSER, tid, DSP_CONTROL, 0);
switch (errno)
{