aboutsummaryrefslogtreecommitdiff
path: root/gdb/ChangeLog
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2019-12-10 14:16:19 -0700
committerTom Tromey <tromey@adacore.com>2019-12-11 08:02:20 -0700
commit2e744276988acd52b967d2505c42ef170147b5f9 (patch)
tree21a6f8e0aed95ed05375201c3b0d20717108b415 /gdb/ChangeLog
parentaac4760f70a4ba503f01a967b33cc218dfc37144 (diff)
downloadgdb-2e744276988acd52b967d2505c42ef170147b5f9.zip
gdb-2e744276988acd52b967d2505c42ef170147b5f9.tar.gz
gdb-2e744276988acd52b967d2505c42ef170147b5f9.tar.bz2
Fix build on macOS
PR build/25268 points out that the build fails on macOS, because on macOS the "pthread_setname_np" function takes a single argument. This patch fixes the problem, by introducing a new adapter function that handles both styles of pthread_setname_np. This change also meant moving the pthread_setname_np call to the thread function, because macOS only permits setting the name of the current thread. This means that there can be a brief window when gdb will see the wrong name; but I think this is a minor concern. Tested by rebuilding on x86-64 Fedora 30, and on macOS High Sierra. On Linux I also debugged gdb to ensure that the thread names are still set correctly. gdb/ChangeLog 2019-12-11 Tom Tromey <tromey@adacore.com> PR build/25268: * gdbsupport/thread-pool.c (set_thread_name): New function. (thread_pool::set_thread_count): Don't call pthread_setname_np. (thread_pool::thread_function): Call set_thread_name. Change-Id: Id7bf28d99ca27a893a9fc87ebb90b15a9c2a9cb4
Diffstat (limited to 'gdb/ChangeLog')
-rw-r--r--gdb/ChangeLog7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 8355da5..7fe3a29 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
2019-12-11 Tom Tromey <tromey@adacore.com>
+ PR build/25268:
+ * gdbsupport/thread-pool.c (set_thread_name): New function.
+ (thread_pool::set_thread_count): Don't call pthread_setname_np.
+ (thread_pool::thread_function): Call set_thread_name.
+
+2019-12-11 Tom Tromey <tromey@adacore.com>
+
* fbsd-tdep.c (fbsd_core_info_proc_status): Cast result of
bfd_get_signed_8.