From cb0a2700865a77a111994ced22fd68815e5eed63 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Thu, 29 Oct 2015 13:41:14 -0400 Subject: [PATCH] Add a cast in jit_target_read_impl 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/ChangeLog | 4 ++++ gdb/jit.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8b79abbbe88..78100fa5b7a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2015-10-29 Simon Marchi + + * jit.c (jit_target_read_impl): Add cast. + 2015-10-29 Simon Marchi * jit.c (jit_reader_load): Add cast. diff --git a/gdb/jit.c b/gdb/jit.c index ddc223dcb37..7c6aede494e 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 -- 2.30.2