From: Yao Qi Date: Tue, 12 Jan 2016 16:29:30 +0000 (+0000) Subject: Fix invalid conversion from void * to gdb_byte * X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d18547d8b08615a58db18ad3e43f721dc92ae298;p=binutils-gdb.git Fix invalid conversion from void * to gdb_byte * This patch fixes the following GDB build error in C++ mode. gdb/nat/linux-ptrace.c: In function 'int linux_child_function(void*)': gdb/nat/linux-ptrace.c:323:65: error: invalid conversion from 'void*' to 'gdb_byte* {aka unsigned char*}' [-fpermissive] linux_fork_to_function (child_stack, linux_grandchild_function); ^ gdb: 2016-01-12 Yao Qi * nat/linux-ptrace.c (linux_child_function): Cast child_stack to gdb_byte * and pass to linux_fork_to_function. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9184afc41cf..74f91d207aa 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2016-01-12 Yao Qi + + * nat/linux-ptrace.c (linux_child_function): Cast child_stack + to gdb_byte * and pass to linux_fork_to_function. + 2016-01-12 Yao Qi * nat/linux-ptrace.c (linux_fork_to_function): Change type diff --git a/gdb/nat/linux-ptrace.c b/gdb/nat/linux-ptrace.c index 31757ee71da..0eaf9a30ff4 100644 --- a/gdb/nat/linux-ptrace.c +++ b/gdb/nat/linux-ptrace.c @@ -320,7 +320,7 @@ linux_child_function (void *child_stack) kill (getpid (), SIGSTOP); /* Fork a grandchild. */ - linux_fork_to_function (child_stack, linux_grandchild_function); + linux_fork_to_function ((gdb_byte *) child_stack, linux_grandchild_function); /* This code is only reacheable by the child (grandchild's parent) process. */