This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix remote/17230


This patch is to fix PR remote/17230, which is a leftover of the
to_xfer_partial interface change.  I tried splint and it reports this
problem like this,

../../../git/gdb/remote-mips.c:2236: Return value type unsigned long long does not match declared type enum target_xfer_status: len

and this problem only exists in remote-mips.c.  Rebuild GDB with all
targets enabled.  I'll commit it in two days.

gdb:

2014-08-06  Yao Qi  <yao@codesourcery.com>

	PR remote/17230
	* remote-mips.c (mips_xfer_memory): Set *xfered_len and return
	TARGET_XFER_OK instead of 0.
---
 gdb/remote-mips.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c
index 236f3cd..7397148 100644
--- a/gdb/remote-mips.c
+++ b/gdb/remote-mips.c
@@ -2233,7 +2233,8 @@ mips_xfer_memory (gdb_byte *readbuf, const gdb_byte *writebuf,
       /* Copy appropriate bytes out of the buffer.  */
       memcpy (readbuf, buffer + (memaddr & 3), len);
     }
-  return len;
+  *xfered_len = len;
+  return TARGET_XFER_OK;
 }
 
 /* Target to_xfer_partial implementation.  */
-- 
1.9.0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]