Bug 17230 - bug in remote-mips.c
Summary: bug in remote-mips.c
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: remote (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: ---
Assignee: Yao Qi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-05 19:10 UTC by Tom Tromey
Modified: 2014-08-07 10:53 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Tromey 2014-08-05 19:10:32 UTC
remote-mips.c has this:

static enum target_xfer_status
mips_xfer_memory (gdb_byte *readbuf, const gdb_byte *writebuf,
		  ULONGEST memaddr, ULONGEST len, ULONGEST *xfered_len)
{
...
  return len;
}

It should probably just return TARGET_XFER_OK here instead.
Comment 1 Yao Qi 2014-08-06 07:44:38 UTC
Patch is posted https://sourceware.org/ml/gdb-patches/2014-08/msg00064.html .
Comment 2 Sourceware Commits 2014-08-07 09:49:15 UTC
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gdb and binutils".

The branch, master has been updated
       via  5ee8a82c47856b204ad76407780e454f8cfd9a72 (commit)
      from  bb974a2493495923903631bab3de9f340526d353 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5ee8a82c47856b204ad76407780e454f8cfd9a72

commit 5ee8a82c47856b204ad76407780e454f8cfd9a72
Author: Yao Qi <yao@codesourcery.com>
Date:   Wed Aug 6 13:27:57 2014 +0800

    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 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.

-----------------------------------------------------------------------

Summary of changes:
 gdb/ChangeLog     |    6 ++++++
 gdb/remote-mips.c |    3 ++-
 2 files changed, 8 insertions(+), 1 deletions(-)
Comment 3 Yao Qi 2014-08-07 10:53:13 UTC
Patch is pushed in.