Fix remote/17230
authorYao Qi <yao@codesourcery.com>
Wed, 6 Aug 2014 05:27:57 +0000 (13:27 +0800)
committerYao Qi <yao@codesourcery.com>
Thu, 7 Aug 2014 09:43:37 +0000 (17:43 +0800)
This patch is to fix PR remote/17230, which is a leftover of the
to_xfer_partial interface change.  I tried splint and it reprots 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.

gdb:

2014-08-07  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/ChangeLog
gdb/remote-mips.c

index 5261972379f6140532ec497954ba249a79e1e2f2..8146deaff6122eb01ad800ef1775fcb456223a0a 100644 (file)
@@ -1,3 +1,9 @@
+2014-08-07  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.
+
 2014-08-07  Gary Benson  <gbenson@redhat.com>
 
        * common/common-defs.h: Include errno.h.
index 1f1650e22e7407fd79ed8e3aef73d9e1df1feacb..19ac30f978a0da02eed49901d7db2d47999a5fba 100644 (file)
@@ -2232,7 +2232,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.  */
This page took 0.038155 seconds and 4 git commands to generate.