diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2016-08-25 08:42:03 +0100 |
---|---|---|
committer | Yao Qi <yao.qi@linaro.org> | 2016-08-25 08:42:03 +0100 |
commit | 754653a7c0a43a668a38aa30c4063b9e292a19f9 (patch) | |
tree | 46ea8d7ff49bad664b118cc91aeb9f3b4e3fe633 /gdb/nat | |
parent | 4a64c29a551392f193e5cb4d876da4683b6e64bb (diff) | |
download | binutils-gdb-754653a7c0a43a668a38aa30c4063b9e292a19f9.tar.gz |
Sync proc_service definition with GLIBC
GLIBC BZ#20311 [1] proc_service.h install patch also remove 'const'
attributes from ps_get_thread_area and comment #15 discuss why to remove
the const attribute (basically since it a callback with the struct
ps_prochandle owned by the client it should be able to modify it if
it the case).
On default build this is not the issue and current g++ does not trigger
any issue with this mismatch declaration. However, on some bootstrap
build configuration where gdbserver is build with gcc instead this
triggers:
error: conflicting types for 'ps_get_thread_area'
This patch fixes it by syncing the declaration with GLIBC.
[1] https://sourceware.org/bugzilla/show_bug.cgi?id=20311
gdb/ChangeLog:
2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
* aarch64-linux-nat.c (ps_get_thread_area): Remove const from
struct ps_prochandle.
* amd64-linux-nat.c (ps_get_thread_area): Likewise.
* arm-linux-nat.c (ps_get_thread_area): Likewise.
* gdb_proc_service.h (ps_get_thread_area): Likewise.
* i386-linux-nat.c (ps_get_thread_area): Likewise.
* m68klinux-nat.c (ps_get_thread_area): Likewise.
* mips-linux-nat.c (ps_get_thread_area): Likewise.
* nat/aarch64-linux.c (aarch64_ps_get_thread_area): Likewise.
* nat/aarch64-linux.h (aarch64_ps_get_thread_area): Likewise.
* xtensa-linux-nat.c (ps_get_thread_area): Likewise.
gdb/gdbserver/ChangeLog:
2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
PR server/20491
* gdb_proc_service.h (ps_get_thread_area): Remove const from struct
ps_prochandle.
* linux-aarch64-low.c (ps_get_thread_area): Likewise.
* linux-arm-low.c (ps_get_thread_area): Likewise.
* linux-crisv32-low.c (ps_get_thread_area): Likewise.
* linux-m68k-low.c (ps_get_thread_area): Likewise.
* linux-mips-low.c (ps_get_thread_area): Likewise.
* linux-nios2-low.c (ps_get_thread_area): Likewise.
* linux-tic6x-low.c (ps_get_thread_area): Likewise.
* linux-x86-low.c (ps_get_thread_area): Likewise.
* linux-xtensa-low.c (ps_get_thread_area): Likewise.
Diffstat (limited to 'gdb/nat')
-rw-r--r-- | gdb/nat/aarch64-linux.c | 2 | ||||
-rw-r--r-- | gdb/nat/aarch64-linux.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/gdb/nat/aarch64-linux.c b/gdb/nat/aarch64-linux.c index 5ae5aa86028..1828977e28f 100644 --- a/gdb/nat/aarch64-linux.c +++ b/gdb/nat/aarch64-linux.c @@ -205,7 +205,7 @@ aarch64_siginfo_from_compat_siginfo (siginfo_t *to, compat_siginfo_t *from) storage (or its descriptor). */ ps_err_e -aarch64_ps_get_thread_area (const struct ps_prochandle *ph, +aarch64_ps_get_thread_area (struct ps_prochandle *ph, lwpid_t lwpid, int idx, void **base, int is_64bit_p) { diff --git a/gdb/nat/aarch64-linux.h b/gdb/nat/aarch64-linux.h index 7221982b784..aac7c68c066 100644 --- a/gdb/nat/aarch64-linux.h +++ b/gdb/nat/aarch64-linux.h @@ -122,7 +122,7 @@ void aarch64_linux_prepare_to_resume (struct lwp_info *lwp); void aarch64_linux_new_thread (struct lwp_info *lwp); -ps_err_e aarch64_ps_get_thread_area (const struct ps_prochandle *ph, +ps_err_e aarch64_ps_get_thread_area (struct ps_prochandle *ph, lwpid_t lwpid, int idx, void **base, int is_64bit_p); |