summaryrefslogtreecommitdiff
path: root/gdb/gdbserver/regcache.c
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2016-01-12 15:18:09 +0000
committerYao Qi <yao.qi@linaro.org>2016-01-12 15:18:09 +0000
commitba4dd7c4a1d99c62a1c2edd68f511a82f8fe041e (patch)
tree2b65a62bae80b33e9fe33bad417dce522ef30cbf /gdb/gdbserver/regcache.c
parentbc504a311794145e7aef2011f31ea87aa64bea4c (diff)
downloadbinutils-gdb-ba4dd7c4a1d99c62a1c2edd68f511a82f8fe041e.tar.gz
Change function signature passed to clone
I see the following compile error with an old bfin-uclinux gcc to build GDBserver, cc1: warnings being treated as errors gdb/gdbserver/../nat/linux-ptrace.c: In function 'linux_fork_to_function': gdb/gdbserver/../nat/linux-ptrace.c:283: error: passing argument 1 of 'clone' from incompatible pointer type in glibc, clone's prototype is like this, and in uClibc, it is the same, int clone(int (*fn)(void *), void *child_stack, int flags, void *arg, ... /* pid_t *ptid, struct user_desc *tls, pid_t *ctid */ ); so this patch changes function signature from 'void (*function) (gdb_byte *)' to 'int (*function) (void *)'. Note that I find Pedro advised to change argument type from 'void *' to 'gdb_byte *' during the patch review https://sourceware.org/ml/gdb-patches/2013-08/msg00611.html however, I think fix compile error can justify the change back to 'void *'. gdb: 2016-01-12 Yao Qi <yao.qi@linaro.org> * nat/linux-ptrace.c (linux_fork_to_function): Change type of argument 'function'. (linux_grandchild_function): Change return type to 'int'. Change child_stack's type to 'void *'. (linux_child_function): Likewise.
Diffstat (limited to 'gdb/gdbserver/regcache.c')
0 files changed, 0 insertions, 0 deletions