From patchwork Thu Oct 29 13:02:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 9450 Received: (qmail 19534 invoked by alias); 29 Oct 2015 13:03:26 -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 19500 invoked by uid 89); 29 Oct 2015 13:03:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_HELO_PASS, SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: relais.videotron.ca Received: from relais.videotron.ca (HELO relais.videotron.ca) (24.201.245.36) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 29 Oct 2015 13:03:23 +0000 Content-transfer-encoding: 7BIT Received: from simarkl.localdomain ([74.58.173.53]) by VL-VM-MR001.ip.videotron.ca (Oracle Communications Messaging Exchange Server 7u4-22.01 64bit (built Apr 21 2011)) with ESMTP id <0NWZ005BLG8Q5V30@VL-VM-MR001.ip.videotron.ca> for gdb-patches@sourceware.org; Thu, 29 Oct 2015 09:03:10 -0400 (EDT) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH c++ 6/6] Add a cast in jit_target_read_impl Date: Thu, 29 Oct 2015 09:02:47 -0400 Message-id: <1446123767-25046-7-git-send-email-simon.marchi@polymtl.ca> In-reply-to: <1446123767-25046-1-git-send-email-simon.marchi@polymtl.ca> References: <1446123767-25046-1-git-send-email-simon.marchi@polymtl.ca> We could change the signature of the function. However, it would require changing gdb_target_read in jit-reader.h, which is an exported interface. It's probably better to just add a cast in our code than to break other people's code. gdb/ChangeLog: * jit.c (jit_target_read_impl): Add cast. --- gdb/jit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gdb/jit.c b/gdb/jit.c index ddc223d..7c6aede 100644 --- a/gdb/jit.c +++ b/gdb/jit.c @@ -491,7 +491,8 @@ typedef CORE_ADDR jit_dbg_reader_data; static enum gdb_status jit_target_read_impl (GDB_CORE_ADDR target_mem, void *gdb_buf, int len) { - int result = target_read_memory ((CORE_ADDR) target_mem, gdb_buf, len); + int result = target_read_memory ((CORE_ADDR) target_mem, + (gdb_byte *) gdb_buf, len); if (result == 0) return GDB_SUCCESS; else