[Lldb-commits] [PATCH] D13019: Do not use pthread_{get, set}name_np() if we don't have GLIBC.
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Mon Sep 21 09:04:57 PDT 2015
labath added a subscriber: labath.
================
Comment at: source/Host/linux/HostThreadLinux.cpp:44
@@ -38,2 +43,3 @@
{
+#if defined(__GLIBC__) && defined(_GNU_SOURCE)
// Read /proc/$TID/comm file.
----------------
While the pthread functions is a glibc extension, the presence of the comm file under /proc definitely does not depend on the C library used. This does not need to be ifdef-ed out.
If you're feeling adventurous, you could reimplement SetName to write to this file and have this functionality regardless of the shared library. If not then ifdef-out the first part only.
http://reviews.llvm.org/D13019
More information about the lldb-commits
mailing list