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 <
revi...@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
>
>
>
>
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to