[prev in list] [next in list] [prev in thread] [next in thread]
List: gdb-cvs
Subject: [binutils-gdb/gdb-7.9-branch] Unbreak DJGPP build of GDB.
From: Eli Zaretskii <eliz () sourceware ! org>
Date: 2015-05-30 10:09:12
Message-ID: 20150530100912.15187.qmail () sourceware ! org
[Download RAW message or body]
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f045cbadc7e222520eb457966ae739ff53ddfd76
commit f045cbadc7e222520eb457966ae739ff53ddfd76
Author: Eli Zaretskii <eliz@gnu.org>
Date: Sat May 30 13:05:53 2015 +0300
Unbreak DJGPP build of GDB.
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.
(cherry picked from commit 99cee7b71f81a9d346fc1a2f4e678537f1bb945f)
Diff:
---
gdb/ChangeLog | 6 ++++++
gdb/go32-nat.c | 6 ++++--
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 8e932f2..8976394 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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 Roland McGrath <mcgrathr@google.com>
PR gdb/18464
diff --git a/gdb/go32-nat.c b/gdb/go32-nat.c
index f3966cd..4f5c2d2 100644
--- a/gdb/go32-nat.c
+++ b/gdb/go32-nat.c
@@ -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;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic