[Lldb-commits] [PATCH] D30844: pthread_setname_np first appeared in glibc 2.12

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Mon Mar 13 05:35:47 PDT 2017


Can we just copy the non portable system call to this location and inline
it here with appropriate glibc check so that we can still delete all that
other obsolete code?
On Mon, Mar 13, 2017 at 4:28 AM Pavel Labath via Phabricator <
reviews at reviews.llvm.org> wrote:

> labath requested changes to this revision.
> labath added a comment.
> This revision now requires changes to proceed.
>
> We need the getter code to get the name of the threads of the process we
> are debugging, so this cannot go away. It also probably does not make sense
> to move this code into llvm, as it is quite debugger-specific and very
> unportable.
>
> We probably don't have a test that we read the thread name correctly, so
> the test suite would not have caught this. I've added a todo for myself to
> add one.
>
> If you want to get your build working, I suggest you just remove the
> setting code. It's conceivable that we may want to change the inferior
> thread name from a debugger, but we don't have that functionality now, and
> the code is wrong anyway, so there's no harm in removing it.
>
>
>
> ================
> Comment at: source/Plugins/Process/Linux/NativeThreadLinux.cpp:100
>    llvm::SmallString<32> thread_name;
> -  HostNativeThread::GetName(GetID(), thread_name);
> +  llvm::get_thread_name(thread_name);
>    return thread_name.c_str();
> ----------------
> This modification is incorrect. The code is supposed to read the name of
> the thread we are debugging, not our own thread name.
>
>
> https://reviews.llvm.org/D30844
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20170313/c8653793/attachment.html>


More information about the lldb-commits mailing list