[Lldb-commits] [PATCH] D30844: pthread_setname_np first appeared in glibc 2.12
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Mar 13 07:53:10 PDT 2017
labath added a comment.
In https://reviews.llvm.org/D30844#699265, @jroelofs wrote:
> > If you want to get your build working, I suggest you just remove the setting code.
>
> @labath I have my local build working, but I don't want to carry local patches if possible.
Yes, that's what I meant. :)
> How about the original patch, which adds the glibc 2.12 check:
>
> void HostThreadLinux::SetName(lldb::thread_t thread, llvm::StringRef name) {
> -#if (defined(__GLIBC__) && defined(_GNU_SOURCE)) || defined(__ANDROID__)
> +#if (((__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12)) && \
> + defined(_GNU_SOURCE)) || defined(__ANDROID__)
> ::pthread_setname_np(thread, name.data());
> #else
> (void)thread;
Just delete that function altogether and keep the `GetName` as-is. If you don't want to do the inlining zachary suggested, that's fine by me. I was planning to kill the `ProcFileReader` class soon, so I can do that then.
https://reviews.llvm.org/D30844
More information about the lldb-commits
mailing list