On noMMU platforms, the following code gets compiled:
child_stack = xmalloc (STACK_SIZE * 4);
Where child_stack is a gdb_byte*, and xmalloc() returns a void*. While
the lack of cast is valid in C, it is not in C++, causing the
following build failure:
../nat/linux-ptrace.c: In function 'int linux_fork_to_function(gdb_byte*, int (*)(void*))':
../nat/linux-ptrace.c:273:29: error: invalid conversion from 'void*' to 'gdb_byte* {aka unsigned char*}' [-fpermissive]
child_stack = xmalloc (STACK_SIZE * 4);
Therefore, this commit adds the appropriate cast.
gdb/ChangeLog:
* nat/linux-ptrace.c (linux_fork_to_function): Add cast to
gdb_byte*.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||
|---|---|---|
| .. | ||
| aarch64-linux-hw-point.c | ||
| aarch64-linux-hw-point.h | ||
| aarch64-linux.c | ||
| aarch64-linux.h | ||
| amd64-linux-siginfo.c | ||
| amd64-linux-siginfo.h | ||
| fork-inferior.c | ||
| fork-inferior.h | ||
| gdb_ptrace.h | ||
| gdb_thread_db.h | ||
| glibc_thread_db.h | ||
| linux-btrace.c | ||
| linux-btrace.h | ||
| linux-namespaces.c | ||
| linux-namespaces.h | ||
| linux-nat.h | ||
| linux-osdata.c | ||
| linux-osdata.h | ||
| linux-personality.c | ||
| linux-personality.h | ||
| linux-procfs.c | ||
| linux-procfs.h | ||
| linux-ptrace.c | ||
| linux-ptrace.h | ||
| linux-waitpid.c | ||
| linux-waitpid.h | ||
| mips-linux-watch.c | ||
| mips-linux-watch.h | ||
| ppc-linux.c | ||
| ppc-linux.h | ||
| x86-cpuid.h | ||
| x86-dregs.c | ||
| x86-dregs.h | ||
| x86-gcc-cpuid.h | ||
| x86-linux-dregs.c | ||
| x86-linux-dregs.h | ||
| x86-linux.c | ||
| x86-linux.h | ||