Fix invalid conversion from void * to gdb_byte *
authorYao Qi <yao.qi@linaro.org>
Tue, 12 Jan 2016 16:29:30 +0000 (16:29 +0000)
committerYao Qi <yao.qi@linaro.org>
Tue, 12 Jan 2016 16:29:30 +0000 (16:29 +0000)
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  <yao.qi@linaro.org>

* nat/linux-ptrace.c (linux_child_function): Cast child_stack
to gdb_byte * and pass to linux_fork_to_function.

gdb/ChangeLog
gdb/nat/linux-ptrace.c

index 9184afc41cf9e425cea5ad31adf00c0e943d47c4..74f91d207aa1fb26b637e14a7ffe54645f6d17a0 100644 (file)
@@ -1,3 +1,8 @@
+2016-01-12  Yao Qi  <yao.qi@linaro.org>
+
+       * 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  <yao.qi@linaro.org>
 
        * nat/linux-ptrace.c (linux_fork_to_function): Change type
index 31757ee71da2da2393b85706d942cc688718b1ab..0eaf9a30ff4cae0b9e8729c2e07b75376bad1b02 100644 (file)
@@ -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.  */
This page took 0.026331 seconds and 4 git commands to generate.