aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2016-08-25 08:42:03 +0100
committerYao Qi <yao.qi@linaro.org>2016-08-25 08:42:03 +0100
commit754653a7c0a43a668a38aa30c4063b9e292a19f9 (patch)
tree46ea8d7ff49bad664b118cc91aeb9f3b4e3fe633 /gdb/gdbserver
parent4a64c29a551392f193e5cb4d876da4683b6e64bb (diff)
downloadgdb-754653a7c0a43a668a38aa30c4063b9e292a19f9.zip
gdb-754653a7c0a43a668a38aa30c4063b9e292a19f9.tar.gz
gdb-754653a7c0a43a668a38aa30c4063b9e292a19f9.tar.bz2
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/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog15
-rw-r--r--gdb/gdbserver/gdb_proc_service.h2
-rw-r--r--gdb/gdbserver/linux-aarch64-low.c2
-rw-r--r--gdb/gdbserver/linux-arm-low.c2
-rw-r--r--gdb/gdbserver/linux-crisv32-low.c2
-rw-r--r--gdb/gdbserver/linux-m68k-low.c2
-rw-r--r--gdb/gdbserver/linux-mips-low.c2
-rw-r--r--gdb/gdbserver/linux-nios2-low.c2
-rw-r--r--gdb/gdbserver/linux-tic6x-low.c2
-rw-r--r--gdb/gdbserver/linux-x86-low.c2
-rw-r--r--gdb/gdbserver/linux-xtensa-low.c2
11 files changed, 25 insertions, 10 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index c28c2cb..af0140f 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,18 @@
+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.
+
2016-08-19 Pedro Alves <palves@redhat.com>
* linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
diff --git a/gdb/gdbserver/gdb_proc_service.h b/gdb/gdbserver/gdb_proc_service.h
index 99bf226..cec9231 100644
--- a/gdb/gdbserver/gdb_proc_service.h
+++ b/gdb/gdbserver/gdb_proc_service.h
@@ -107,7 +107,7 @@ extern pid_t ps_getpid (struct ps_prochandle *);
/* Fetch the special per-thread address associated with the given LWP.
This call is only used on a few platforms (most use a normal register).
The meaning of the `int' parameter is machine-dependent. */
-extern ps_err_e ps_get_thread_area (const struct ps_prochandle *,
+extern ps_err_e ps_get_thread_area (struct ps_prochandle *,
lwpid_t, int, psaddr_t *);
diff --git a/gdb/gdbserver/linux-aarch64-low.c b/gdb/gdbserver/linux-aarch64-low.c
index 6efa035..e54a8ba 100644
--- a/gdb/gdbserver/linux-aarch64-low.c
+++ b/gdb/gdbserver/linux-aarch64-low.c
@@ -401,7 +401,7 @@ aarch64_stopped_by_watchpoint (void)
/* Fetch the thread-local storage pointer for libthread_db. */
ps_err_e
-ps_get_thread_area (const struct ps_prochandle *ph,
+ps_get_thread_area (struct ps_prochandle *ph,
lwpid_t lwpid, int idx, void **base)
{
return aarch64_ps_get_thread_area (ph, lwpid, idx, base,
diff --git a/gdb/gdbserver/linux-arm-low.c b/gdb/gdbserver/linux-arm-low.c
index e1261e5..ed9b356 100644
--- a/gdb/gdbserver/linux-arm-low.c
+++ b/gdb/gdbserver/linux-arm-low.c
@@ -270,7 +270,7 @@ get_next_pcs_read_memory_unsigned_integer (CORE_ADDR memaddr,
/* Fetch the thread-local storage pointer for libthread_db. */
ps_err_e
-ps_get_thread_area (const struct ps_prochandle *ph,
+ps_get_thread_area (struct ps_prochandle *ph,
lwpid_t lwpid, int idx, void **base)
{
if (ptrace (PTRACE_GET_THREAD_AREA, lwpid, NULL, base) != 0)
diff --git a/gdb/gdbserver/linux-crisv32-low.c b/gdb/gdbserver/linux-crisv32-low.c
index 16c1f72..fea6d5b 100644
--- a/gdb/gdbserver/linux-crisv32-low.c
+++ b/gdb/gdbserver/linux-crisv32-low.c
@@ -309,7 +309,7 @@ cris_stopped_data_address (void)
}
ps_err_e
-ps_get_thread_area (const struct ps_prochandle *ph,
+ps_get_thread_area (struct ps_prochandle *ph,
lwpid_t lwpid, int idx, void **base)
{
if (ptrace (PTRACE_GET_THREAD_AREA, lwpid, NULL, base) != 0)
diff --git a/gdb/gdbserver/linux-m68k-low.c b/gdb/gdbserver/linux-m68k-low.c
index df3d7c6..78a340f 100644
--- a/gdb/gdbserver/linux-m68k-low.c
+++ b/gdb/gdbserver/linux-m68k-low.c
@@ -152,7 +152,7 @@ m68k_breakpoint_at (CORE_ADDR pc)
/* Fetch the thread-local storage pointer for libthread_db. */
ps_err_e
-ps_get_thread_area (const struct ps_prochandle *ph,
+ps_get_thread_area (struct ps_prochandle *ph,
lwpid_t lwpid, int idx, void **base)
{
if (ptrace (PTRACE_GET_THREAD_AREA, lwpid, NULL, base) != 0)
diff --git a/gdb/gdbserver/linux-mips-low.c b/gdb/gdbserver/linux-mips-low.c
index 30a03d5..9356bb3 100644
--- a/gdb/gdbserver/linux-mips-low.c
+++ b/gdb/gdbserver/linux-mips-low.c
@@ -637,7 +637,7 @@ mips_stopped_data_address (void)
/* Fetch the thread-local storage pointer for libthread_db. */
ps_err_e
-ps_get_thread_area (const struct ps_prochandle *ph,
+ps_get_thread_area (struct ps_prochandle *ph,
lwpid_t lwpid, int idx, void **base)
{
if (ptrace (PTRACE_GET_THREAD_AREA, lwpid, NULL, base) != 0)
diff --git a/gdb/gdbserver/linux-nios2-low.c b/gdb/gdbserver/linux-nios2-low.c
index a32bc1a..02fe198 100644
--- a/gdb/gdbserver/linux-nios2-low.c
+++ b/gdb/gdbserver/linux-nios2-low.c
@@ -145,7 +145,7 @@ nios2_breakpoint_at (CORE_ADDR where)
/* Fetch the thread-local storage pointer for libthread_db. */
ps_err_e
-ps_get_thread_area (const struct ps_prochandle *ph,
+ps_get_thread_area (struct ps_prochandle *ph,
lwpid_t lwpid, int idx, void **base)
{
if (ptrace (PTRACE_GET_THREAD_AREA, lwpid, NULL, base) != 0)
diff --git a/gdb/gdbserver/linux-tic6x-low.c b/gdb/gdbserver/linux-tic6x-low.c
index e40a3af..6b90560 100644
--- a/gdb/gdbserver/linux-tic6x-low.c
+++ b/gdb/gdbserver/linux-tic6x-low.c
@@ -274,7 +274,7 @@ tic6x_breakpoint_at (CORE_ADDR where)
/* Fetch the thread-local storage pointer for libthread_db. */
ps_err_e
-ps_get_thread_area (const struct ps_prochandle *ph,
+ps_get_thread_area (struct ps_prochandle *ph,
lwpid_t lwpid, int idx, void **base)
{
if (ptrace (PTRACE_GET_THREAD_AREA, lwpid, NULL, base) != 0)
diff --git a/gdb/gdbserver/linux-x86-low.c b/gdb/gdbserver/linux-x86-low.c
index d847b93..acded1a 100644
--- a/gdb/gdbserver/linux-x86-low.c
+++ b/gdb/gdbserver/linux-x86-low.c
@@ -186,7 +186,7 @@ is_64bit_tdesc (void)
/* Called by libthread_db. */
ps_err_e
-ps_get_thread_area (const struct ps_prochandle *ph,
+ps_get_thread_area (struct ps_prochandle *ph,
lwpid_t lwpid, int idx, void **base)
{
#ifdef __x86_64__
diff --git a/gdb/gdbserver/linux-xtensa-low.c b/gdb/gdbserver/linux-xtensa-low.c
index 6e945ea..431082c 100644
--- a/gdb/gdbserver/linux-xtensa-low.c
+++ b/gdb/gdbserver/linux-xtensa-low.c
@@ -177,7 +177,7 @@ xtensa_breakpoint_at (CORE_ADDR where)
/* Called by libthread_db. */
ps_err_e
-ps_get_thread_area (const struct ps_prochandle *ph,
+ps_get_thread_area (struct ps_prochandle *ph,
lwpid_t lwpid, int idx, void **base)
{
xtensa_elf_gregset_t regs;