From patchwork Mon Oct 12 04:32:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 9050 Received: (qmail 75587 invoked by alias); 12 Oct 2015 04:32:21 -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 75524 invoked by uid 89); 12 Oct 2015 04:32:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL, BAYES_00, SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: smtp.electronicbox.net Received: from smtp.electronicbox.net (HELO smtp.electronicbox.net) (96.127.255.83) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 12 Oct 2015 04:32:18 +0000 Received: from simark.lan. (cable-192.222.137.139.electronicbox.net [192.222.137.139]) by smtp.electronicbox.net (Postfix) with ESMTP id 5CD58440E79; Mon, 12 Oct 2015 00:32:17 -0400 (EDT) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH c++ 2/6] solib-spu: Add gdb_byte* cast Date: Mon, 12 Oct 2015 00:32:05 -0400 Message-Id: <1444624329-4828-2-git-send-email-simon.marchi@polymtl.ca> In-Reply-To: <1444624329-4828-1-git-send-email-simon.marchi@polymtl.ca> References: <1444624329-4828-1-git-send-email-simon.marchi@polymtl.ca> MIME-Version: 1.0 Fixes this error: /home/simark/src/binutils-gdb/gdb/solib-spu.c: In function ‘file_ptr spu_bfd_iovec_pread(bfd*, void*, void*, file_ptr, file_ptr)’: /home/simark/src/binutils-gdb/gdb/solib-spu.c:299:55: error: invalid conversion from ‘void*’ to ‘gdb_byte* {aka unsigned char*}’ [-fpermissive] ret = target_read_memory (addr + offset, buf, nbytes); ^ In file included from /home/simark/src/binutils-gdb/gdb/target.h:65:0, from /home/simark/src/binutils-gdb/gdb/exec.h:23, from /home/simark/src/binutils-gdb/gdb/gdbcore.h:29, from /home/simark/src/binutils-gdb/gdb/solib-spu.c:23: /home/simark/src/binutils-gdb/gdb/target/target.h:35:12: note: initializing argument 2 of ‘int target_read_memory(CORE_ADDR, gdb_byte*, ssize_t)’ extern int target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, gdb/ChangeLog: * solib-spu.c (spu_bfd_iovec_pread): Add (gdb_byte *) cast. --- gdb/solib-spu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/solib-spu.c b/gdb/solib-spu.c index 468ab1a..dca13e0 100644 --- a/gdb/solib-spu.c +++ b/gdb/solib-spu.c @@ -296,7 +296,7 @@ spu_bfd_iovec_pread (bfd *abfd, void *stream, void *buf, CORE_ADDR addr = *(CORE_ADDR *)stream; int ret; - ret = target_read_memory (addr + offset, buf, nbytes); + ret = target_read_memory (addr + offset, (gdb_byte *) buf, nbytes); if (ret != 0) { bfd_set_error (bfd_error_invalid_operation);