]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Unbreak DJGPP build of GDB.
authorEli Zaretskii <eliz@gnu.org>
Sat, 30 May 2015 10:05:53 +0000 (13:05 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 30 May 2015 10:05:53 +0000 (13:05 +0300)
gdb/
* go32-nat.c (go32_xfer_memory): Fix the return value to be
compatible to what read_child and write_child return.  This
unbreaks that DJGPP build of GDB which was broken since v7.7.

gdb/ChangeLog
gdb/go32-nat.c

index de6bf9e7522a240d270e0395fb474710d70dbbe4..72e6f4a08d87da67b33b9d2b6cead2d975ba9e27 100644 (file)
@@ -1,3 +1,9 @@
+2015-05-30  Eli Zaretskii  <eliz@gnu.org>
+
+       * go32-nat.c (go32_xfer_memory): Fix the return value to be
+       compatible to what read_child and write_child return.  This
+       unbreaks that DJGPP build of GDB which was broken since v7.7.
+
 2015-05-29  Martin Galvan  <martin.galvan@tallertechnologies.com>
 
        * MAINTAINERS (Write After Approval): Add Martin Galvan.
index f3966cd534ec15e0f841e5f520a7b2bbbffd37a9..4f5c2d2336ebfda4abb2167bfcda25fd49a6acc9 100644 (file)
@@ -587,10 +587,12 @@ go32_xfer_memory (gdb_byte *readbuf, const gdb_byte *writebuf,
   else
     res = read_child (memaddr, readbuf, len);
 
-  if (res <= 0)
+  /* read_child and write_child return zero on success, non-zero on
+     failure.  */
+  if (res != 0)
     return TARGET_XFER_E_IO;
 
-  *xfered_len = res;
+  *xfered_len = len;
   return TARGET_XFER_OK;
 }