]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Sync proc_service definition with GLIBC gdb-7.11-branch
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 25 Aug 2016 07:42:03 +0000 (08:42 +0100)
committerYao Qi <yao.qi@linaro.org>
Thu, 25 Aug 2016 07:55:27 +0000 (08:55 +0100)
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.

22 files changed:
gdb/ChangeLog
gdb/aarch64-linux-nat.c
gdb/amd64-linux-nat.c
gdb/arm-linux-nat.c
gdb/gdb_proc_service.h
gdb/gdbserver/ChangeLog
gdb/gdbserver/gdb_proc_service.h
gdb/gdbserver/linux-aarch64-low.c
gdb/gdbserver/linux-arm-low.c
gdb/gdbserver/linux-crisv32-low.c
gdb/gdbserver/linux-m68k-low.c
gdb/gdbserver/linux-mips-low.c
gdb/gdbserver/linux-nios2-low.c
gdb/gdbserver/linux-tic6x-low.c
gdb/gdbserver/linux-x86-low.c
gdb/gdbserver/linux-xtensa-low.c
gdb/i386-linux-nat.c
gdb/m68klinux-nat.c
gdb/mips-linux-nat.c
gdb/nat/aarch64-linux.c
gdb/nat/aarch64-linux.h
gdb/xtensa-linux-nat.c

index 9b6562502e67bf717fd96e64ada0d7988704bde4..a03afdb82f0f4671ebb4339f163de40f390a52d2 100644 (file)
@@ -1,3 +1,17 @@
+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.
+
 2016-06-01  Joel Brobecker  <brobecker@adacore.com>
 
        * version.in: Set GDB version number to 7.11.1.DATE-git.
index fe1631dbbb64209b47de5d6bdc4e2b3d3b5d0f9b..5166eebd337c31cfdced31d5b84cf90d4ae7ad19 100644 (file)
@@ -457,7 +457,7 @@ aarch64_linux_new_fork (struct lwp_info *parent, pid_t child_pid)
    storage (or its descriptor).  */
 
 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)
 {
   int is_64bit_p
index 391a646992b55967b7203399099da7010ea3d5ca..9da36fd1ba506985ce23a9210348f288844dec99 100644 (file)
@@ -245,7 +245,7 @@ amd64_linux_store_inferior_registers (struct target_ops *ops,
    a request for a thread's local storage address.  */
 
 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 (gdbarch_bfd_arch_info (target_gdbarch ())->bits_per_word == 32)
index d77ca9349849a07c8b18ab13f4a87fbb1f7412c0..d11bdc6e225ad6041aec3248002fb6c9fe9a47d1 100644 (file)
@@ -477,7 +477,7 @@ supply_fpregset (struct regcache *regcache, const gdb_fpregset_t *fpregsetp)
 /* 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)
index 04d3c0388434296a6bdaf9cfb39596bb85fca516..a1a8eb5b2f2bd53c84eaf9429624784531de933c 100644 (file)
@@ -124,7 +124,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 *);
 
 
index 08fef5b06ef454cc4ef7cf2025e0c567f1dbf7d3..ea278b1250048f247a70fadff89631fbd218d6a8 100644 (file)
@@ -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-04-15  Pedro Alves  <palves@redhat.com>
 
        * linux-low.c (check_stopped_by_breakpoint): Rename to ...
index 99bf226b01b90c4c349656caaac747baad2d80be..cec9231ee5b3b1ace0e4509dd2c3ac26acd2ac2f 100644 (file)
@@ -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 *);
 
 
index 806a76260f89d370139b3c2d88eda8d62fce9750..b86f210390eb4fd8eb4d6c9399b7f03b3aa94cab 100644 (file)
@@ -421,7 +421,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,
index 0f627069e0ed6678b3a11ce733c199c719d1a813..9f043878c7d9d29f6312f8e2f849f279712ed12e 100644 (file)
@@ -269,7 +269,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)
index 16c1f72015136371e38017b7467fafcda5c5282a..fea6d5bf9b343531984cf4774f1753c3a8a67080 100644 (file)
@@ -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)
index df3d7c6d9c7522986b033888f64946a8d96f663e..78a340fa8fa68af375b5f8e77ead37d235899ceb 100644 (file)
@@ -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)
index 30a03d5f438816e1a189cfd7fb10ca24b1de67cc..9356bb3d9969fd711514e0d3ea03b7cf1954e336 100644 (file)
@@ -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)
index ea0ded1f1ecfa4886cd37b885dee056ac6d88d7a..98a85ed8e32919ae85b4a9c46f4aff48ba2dd496 100644 (file)
@@ -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)
index e40a3aff5129452834380df003b8f6536cf2bf4d..6b90560dc4de6249f8c48099d4c3ce518421c68c 100644 (file)
@@ -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)
index 0c4954a58dc9c4d87a8d776fd28d498307cf4332..8bac10a54be00262f74ee6ecd2de3368c23e9c04 100644 (file)
@@ -236,7 +236,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__
index 6e945eac173c768d3af766bb7fb66c98c19847f8..431082c01f1cdd67a2eed54d499065421b9c0f07 100644 (file)
@@ -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;
index a41ee2108152f63ea9560f5a3f847766f06158f3..70d954fdc00bc03b1d7053bbe26d13aeaad398d3 100644 (file)
@@ -603,7 +603,7 @@ i386_linux_store_inferior_registers (struct target_ops *ops,
    storage (or its descriptor).  */
 
 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)
 {
   unsigned int base_addr;
index 24b6242ba39cf71bf31b573617a660add00b23cc..5b8684b719765caaa6d5597085618827513804c0 100644 (file)
@@ -508,7 +508,7 @@ m68k_linux_store_inferior_registers (struct target_ops *ops,
 /* 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)
index bfe9fcbe687724349f19ad4ea0267df9d1c0c6a7..0f20f16814fa0415ab7135149736a78491c1d6d5 100644 (file)
@@ -152,7 +152,7 @@ mips64_linux_register_addr (struct gdbarch *gdbarch, int regno, int store)
 /* 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)
index 5ae5aa860285e564e7668a8988f3772632983a10..1828977e28f505ff60648df397a198fc9ec581e2 100644 (file)
@@ -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)
 {
index 7221982b784ba958005c25c5bea93cb1707f000f..aac7c68c0660049c55c3e1f1eb3a47604f9926dc 100644 (file)
@@ -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);
 
index 54da83791ae793ef75f388764c77741316a86b23..836d3f80ee481602fdb6aff0763c72ef63fbeff4 100644 (file)
@@ -286,7 +286,7 @@ xtensa_linux_store_inferior_registers (struct target_ops *ops,
 /* 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;