This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH c++ 2/6] solib-spu: Add gdb_byte* cast
- From: Pedro Alves <palves at redhat dot com>
- To: Simon Marchi <simon dot marchi at polymtl dot ca>, gdb-patches at sourceware dot org
- Date: Thu, 22 Oct 2015 11:57:18 +0100
- Subject: Re: [PATCH c++ 2/6] solib-spu: Add gdb_byte* cast
- Authentication-results: sourceware.org; auth=none
- References: <1444624329-4828-1-git-send-email-simon dot marchi at polymtl dot ca> <1444624329-4828-2-git-send-email-simon dot marchi at polymtl dot ca>
On 10/12/2015 05:32 AM, Simon Marchi wrote:
> 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.
OK.
Thanks,
Pedro Alves