From patchwork Wed Aug 6 06:13:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 2310 Received: (qmail 9406 invoked by alias); 6 Aug 2014 06:17:44 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 9389 invoked by uid 89); 6 Aug 2014 06:17:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 06 Aug 2014 06:17:40 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1XEuXZ-0000iq-Fg from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Tue, 05 Aug 2014 23:17:37 -0700 Received: from SVR-ORW-FEM-06.mgc.mentorg.com ([147.34.97.120]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Tue, 5 Aug 2014 23:17:37 -0700 Received: from qiyao.dyndns.org.com (147.34.91.1) by SVR-ORW-FEM-06.mgc.mentorg.com (147.34.97.120) with Microsoft SMTP Server id 14.2.247.3; Tue, 5 Aug 2014 23:17:35 -0700 From: Yao Qi To: Subject: [PATCH] Fix remote/17230 Date: Wed, 6 Aug 2014 14:13:27 +0800 Message-ID: <1407305607-3602-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 X-IsSubscribed: yes 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 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. */