• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

Revision140bf80050b34f0947b34dba93b830ea2bfc5040 (tree)
Zeit2016-08-25 16:55:27
AutorAdhemerval Zanella <adhemerval.zanella@lina...>
CommiterYao Qi

Log Message

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.

Ändern Zusammenfassung

Diff

--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,17 @@
1+2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2+
3+ * aarch64-linux-nat.c (ps_get_thread_area): Remove const from
4+ struct ps_prochandle.
5+ * amd64-linux-nat.c (ps_get_thread_area): Likewise.
6+ * arm-linux-nat.c (ps_get_thread_area): Likewise.
7+ * gdb_proc_service.h (ps_get_thread_area): Likewise.
8+ * i386-linux-nat.c (ps_get_thread_area): Likewise.
9+ * m68klinux-nat.c (ps_get_thread_area): Likewise.
10+ * mips-linux-nat.c (ps_get_thread_area): Likewise.
11+ * nat/aarch64-linux.c (aarch64_ps_get_thread_area): Likewise.
12+ * nat/aarch64-linux.h (aarch64_ps_get_thread_area): Likewise.
13+ * xtensa-linux-nat.c (ps_get_thread_area): Likewise.
14+
115 2016-06-01 Joel Brobecker <brobecker@adacore.com>
216
317 * version.in: Set GDB version number to 7.11.1.DATE-git.
--- a/gdb/aarch64-linux-nat.c
+++ b/gdb/aarch64-linux-nat.c
@@ -457,7 +457,7 @@ aarch64_linux_new_fork (struct lwp_info *parent, pid_t child_pid)
457457 storage (or its descriptor). */
458458
459459 ps_err_e
460-ps_get_thread_area (const struct ps_prochandle *ph,
460+ps_get_thread_area (struct ps_prochandle *ph,
461461 lwpid_t lwpid, int idx, void **base)
462462 {
463463 int is_64bit_p
--- a/gdb/amd64-linux-nat.c
+++ b/gdb/amd64-linux-nat.c
@@ -245,7 +245,7 @@ amd64_linux_store_inferior_registers (struct target_ops *ops,
245245 a request for a thread's local storage address. */
246246
247247 ps_err_e
248-ps_get_thread_area (const struct ps_prochandle *ph,
248+ps_get_thread_area (struct ps_prochandle *ph,
249249 lwpid_t lwpid, int idx, void **base)
250250 {
251251 if (gdbarch_bfd_arch_info (target_gdbarch ())->bits_per_word == 32)
--- a/gdb/arm-linux-nat.c
+++ b/gdb/arm-linux-nat.c
@@ -477,7 +477,7 @@ supply_fpregset (struct regcache *regcache, const gdb_fpregset_t *fpregsetp)
477477 /* Fetch the thread-local storage pointer for libthread_db. */
478478
479479 ps_err_e
480-ps_get_thread_area (const struct ps_prochandle *ph,
480+ps_get_thread_area (struct ps_prochandle *ph,
481481 lwpid_t lwpid, int idx, void **base)
482482 {
483483 if (ptrace (PTRACE_GET_THREAD_AREA, lwpid, NULL, base) != 0)
--- a/gdb/gdb_proc_service.h
+++ b/gdb/gdb_proc_service.h
@@ -124,7 +124,7 @@ extern pid_t ps_getpid (struct ps_prochandle *);
124124 /* Fetch the special per-thread address associated with the given LWP.
125125 This call is only used on a few platforms (most use a normal register).
126126 The meaning of the `int' parameter is machine-dependent. */
127-extern ps_err_e ps_get_thread_area (const struct ps_prochandle *,
127+extern ps_err_e ps_get_thread_area (struct ps_prochandle *,
128128 lwpid_t, int, psaddr_t *);
129129
130130
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,18 @@
1+2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2+
3+ PR server/20491
4+ * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
5+ ps_prochandle.
6+ * linux-aarch64-low.c (ps_get_thread_area): Likewise.
7+ * linux-arm-low.c (ps_get_thread_area): Likewise.
8+ * linux-crisv32-low.c (ps_get_thread_area): Likewise.
9+ * linux-m68k-low.c (ps_get_thread_area): Likewise.
10+ * linux-mips-low.c (ps_get_thread_area): Likewise.
11+ * linux-nios2-low.c (ps_get_thread_area): Likewise.
12+ * linux-tic6x-low.c (ps_get_thread_area): Likewise.
13+ * linux-x86-low.c (ps_get_thread_area): Likewise.
14+ * linux-xtensa-low.c (ps_get_thread_area): Likewise.
15+
116 2016-04-15 Pedro Alves <palves@redhat.com>
217
318 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
--- 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 *);
107107 /* Fetch the special per-thread address associated with the given LWP.
108108 This call is only used on a few platforms (most use a normal register).
109109 The meaning of the `int' parameter is machine-dependent. */
110-extern ps_err_e ps_get_thread_area (const struct ps_prochandle *,
110+extern ps_err_e ps_get_thread_area (struct ps_prochandle *,
111111 lwpid_t, int, psaddr_t *);
112112
113113
--- a/gdb/gdbserver/linux-aarch64-low.c
+++ b/gdb/gdbserver/linux-aarch64-low.c
@@ -421,7 +421,7 @@ aarch64_stopped_by_watchpoint (void)
421421 /* Fetch the thread-local storage pointer for libthread_db. */
422422
423423 ps_err_e
424-ps_get_thread_area (const struct ps_prochandle *ph,
424+ps_get_thread_area (struct ps_prochandle *ph,
425425 lwpid_t lwpid, int idx, void **base)
426426 {
427427 return aarch64_ps_get_thread_area (ph, lwpid, idx, base,
--- a/gdb/gdbserver/linux-arm-low.c
+++ b/gdb/gdbserver/linux-arm-low.c
@@ -269,7 +269,7 @@ get_next_pcs_read_memory_unsigned_integer (CORE_ADDR memaddr,
269269 /* Fetch the thread-local storage pointer for libthread_db. */
270270
271271 ps_err_e
272-ps_get_thread_area (const struct ps_prochandle *ph,
272+ps_get_thread_area (struct ps_prochandle *ph,
273273 lwpid_t lwpid, int idx, void **base)
274274 {
275275 if (ptrace (PTRACE_GET_THREAD_AREA, lwpid, NULL, base) != 0)
--- a/gdb/gdbserver/linux-crisv32-low.c
+++ b/gdb/gdbserver/linux-crisv32-low.c
@@ -309,7 +309,7 @@ cris_stopped_data_address (void)
309309 }
310310
311311 ps_err_e
312-ps_get_thread_area (const struct ps_prochandle *ph,
312+ps_get_thread_area (struct ps_prochandle *ph,
313313 lwpid_t lwpid, int idx, void **base)
314314 {
315315 if (ptrace (PTRACE_GET_THREAD_AREA, lwpid, NULL, base) != 0)
--- a/gdb/gdbserver/linux-m68k-low.c
+++ b/gdb/gdbserver/linux-m68k-low.c
@@ -152,7 +152,7 @@ m68k_breakpoint_at (CORE_ADDR pc)
152152 /* Fetch the thread-local storage pointer for libthread_db. */
153153
154154 ps_err_e
155-ps_get_thread_area (const struct ps_prochandle *ph,
155+ps_get_thread_area (struct ps_prochandle *ph,
156156 lwpid_t lwpid, int idx, void **base)
157157 {
158158 if (ptrace (PTRACE_GET_THREAD_AREA, lwpid, NULL, base) != 0)
--- a/gdb/gdbserver/linux-mips-low.c
+++ b/gdb/gdbserver/linux-mips-low.c
@@ -637,7 +637,7 @@ mips_stopped_data_address (void)
637637 /* Fetch the thread-local storage pointer for libthread_db. */
638638
639639 ps_err_e
640-ps_get_thread_area (const struct ps_prochandle *ph,
640+ps_get_thread_area (struct ps_prochandle *ph,
641641 lwpid_t lwpid, int idx, void **base)
642642 {
643643 if (ptrace (PTRACE_GET_THREAD_AREA, lwpid, NULL, base) != 0)
--- a/gdb/gdbserver/linux-nios2-low.c
+++ b/gdb/gdbserver/linux-nios2-low.c
@@ -145,7 +145,7 @@ nios2_breakpoint_at (CORE_ADDR where)
145145 /* Fetch the thread-local storage pointer for libthread_db. */
146146
147147 ps_err_e
148-ps_get_thread_area (const struct ps_prochandle *ph,
148+ps_get_thread_area (struct ps_prochandle *ph,
149149 lwpid_t lwpid, int idx, void **base)
150150 {
151151 if (ptrace (PTRACE_GET_THREAD_AREA, lwpid, NULL, base) != 0)
--- a/gdb/gdbserver/linux-tic6x-low.c
+++ b/gdb/gdbserver/linux-tic6x-low.c
@@ -274,7 +274,7 @@ tic6x_breakpoint_at (CORE_ADDR where)
274274 /* Fetch the thread-local storage pointer for libthread_db. */
275275
276276 ps_err_e
277-ps_get_thread_area (const struct ps_prochandle *ph,
277+ps_get_thread_area (struct ps_prochandle *ph,
278278 lwpid_t lwpid, int idx, void **base)
279279 {
280280 if (ptrace (PTRACE_GET_THREAD_AREA, lwpid, NULL, base) != 0)
--- a/gdb/gdbserver/linux-x86-low.c
+++ b/gdb/gdbserver/linux-x86-low.c
@@ -236,7 +236,7 @@ is_64bit_tdesc (void)
236236 /* Called by libthread_db. */
237237
238238 ps_err_e
239-ps_get_thread_area (const struct ps_prochandle *ph,
239+ps_get_thread_area (struct ps_prochandle *ph,
240240 lwpid_t lwpid, int idx, void **base)
241241 {
242242 #ifdef __x86_64__
--- a/gdb/gdbserver/linux-xtensa-low.c
+++ b/gdb/gdbserver/linux-xtensa-low.c
@@ -177,7 +177,7 @@ xtensa_breakpoint_at (CORE_ADDR where)
177177 /* Called by libthread_db. */
178178
179179 ps_err_e
180-ps_get_thread_area (const struct ps_prochandle *ph,
180+ps_get_thread_area (struct ps_prochandle *ph,
181181 lwpid_t lwpid, int idx, void **base)
182182 {
183183 xtensa_elf_gregset_t regs;
--- a/gdb/i386-linux-nat.c
+++ b/gdb/i386-linux-nat.c
@@ -603,7 +603,7 @@ i386_linux_store_inferior_registers (struct target_ops *ops,
603603 storage (or its descriptor). */
604604
605605 ps_err_e
606-ps_get_thread_area (const struct ps_prochandle *ph,
606+ps_get_thread_area (struct ps_prochandle *ph,
607607 lwpid_t lwpid, int idx, void **base)
608608 {
609609 unsigned int base_addr;
--- a/gdb/m68klinux-nat.c
+++ b/gdb/m68klinux-nat.c
@@ -508,7 +508,7 @@ m68k_linux_store_inferior_registers (struct target_ops *ops,
508508 /* Fetch the thread-local storage pointer for libthread_db. */
509509
510510 ps_err_e
511-ps_get_thread_area (const struct ps_prochandle *ph,
511+ps_get_thread_area (struct ps_prochandle *ph,
512512 lwpid_t lwpid, int idx, void **base)
513513 {
514514 if (ptrace (PTRACE_GET_THREAD_AREA, lwpid, NULL, base) < 0)
--- a/gdb/mips-linux-nat.c
+++ b/gdb/mips-linux-nat.c
@@ -152,7 +152,7 @@ mips64_linux_register_addr (struct gdbarch *gdbarch, int regno, int store)
152152 /* Fetch the thread-local storage pointer for libthread_db. */
153153
154154 ps_err_e
155-ps_get_thread_area (const struct ps_prochandle *ph,
155+ps_get_thread_area (struct ps_prochandle *ph,
156156 lwpid_t lwpid, int idx, void **base)
157157 {
158158 if (ptrace (PTRACE_GET_THREAD_AREA, lwpid, NULL, base) != 0)
--- 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)
205205 storage (or its descriptor). */
206206
207207 ps_err_e
208-aarch64_ps_get_thread_area (const struct ps_prochandle *ph,
208+aarch64_ps_get_thread_area (struct ps_prochandle *ph,
209209 lwpid_t lwpid, int idx, void **base,
210210 int is_64bit_p)
211211 {
--- 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);
122122
123123 void aarch64_linux_new_thread (struct lwp_info *lwp);
124124
125-ps_err_e aarch64_ps_get_thread_area (const struct ps_prochandle *ph,
125+ps_err_e aarch64_ps_get_thread_area (struct ps_prochandle *ph,
126126 lwpid_t lwpid, int idx, void **base,
127127 int is_64bit_p);
128128
--- a/gdb/xtensa-linux-nat.c
+++ b/gdb/xtensa-linux-nat.c
@@ -286,7 +286,7 @@ xtensa_linux_store_inferior_registers (struct target_ops *ops,
286286 /* Called by libthread_db. */
287287
288288 ps_err_e
289-ps_get_thread_area (const struct ps_prochandle *ph,
289+ps_get_thread_area (struct ps_prochandle *ph,
290290 lwpid_t lwpid, int idx, void **base)
291291 {
292292 xtensa_elf_gregset_t regs;