Commit Message
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(-)
Comments
>>>>> "Yao" == Yao Qi <yao@codesourcery.com> writes:
Yao> ../../../git/gdb/remote-mips.c:2236: Return value type unsigned long long does not match declared type enum target_xfer_status: len
Nice.
Yao> and this problem only exists in remote-mips.c. Rebuild GDB with all
Yao> targets enabled. I'll commit it in two days.
FWIW it looks good to me.
Tom
On 08/07/2014 12:00 AM, Tom Tromey wrote:
> FWIW it looks good to me.
Thanks for the review, Tom. Patch is pushed in.
@@ -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. */