[Lldb-commits] [PATCH] D30981: Remove HostThreadLinux/Free/NetBSD

2017-03-15 Thread Pavel Labath via Phabricator via lldb-commits
labath created this revision. Herald added a subscriber: mgorny. These classes existed only because of the GetName() static function, which can be moved to a more natural place anyway. I move the linux version to NativeProcessLinux (and get rid of ProcFileReader), the freebsd version to ProcessFre

[Lldb-commits] [PATCH] D30981: Remove HostThreadLinux/Free/NetBSD

2017-03-15 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. > remove the NetBSD version (which was probably incorrect anyway, as it assumes > the current process instead of the inferior. Yes, I had issues with this and I wanted to take rid of it completely during the last month. I'm patching it out in my local LLDB tree... (

[Lldb-commits] [PATCH] D30981: Remove HostThreadLinux/Free/NetBSD

2017-03-15 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: source/Plugins/Process/FreeBSD/FreeBSDThread.cpp:128 + if (kp == nullptr || (error != 0 && errno == ENOMEM)) { +// Add extra space in case threads are added before next call. +len += sizeof(*kp) + len / 10; -

[Lldb-commits] [PATCH] D30981: Remove HostThreadLinux/Free/NetBSD

2017-03-16 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. In https://reviews.llvm.org/D30981#701902, @krytarowski wrote: > Currently these calls for set/get thread name were moved to LLVM. I haven't > checked other systems but the NetBSD one must be called for the current > process. > > The original NetBSD version was ported fr

[Lldb-commits] [PATCH] D30981: Remove HostThreadLinux/Free/NetBSD

2017-03-16 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski accepted this revision. krytarowski added a comment. This revision is now accepted and ready to land. Thank you for your explanation. I will use approach similar to FreeBSD on NetBSD. I agree that leaving the FreeBSD code is best for the maintainers - it's good enough. https://rev

[Lldb-commits] [PATCH] D30981: Remove HostThreadLinux/Free/NetBSD

2017-03-16 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: packages/Python/lldbsuite/test/tools/lldb-server/thread-name/main.cpp:6 +#if defined(__linux__) || defined(__NetBSD__) + ::pthread_setname_np(::pthread_self(), name); +#elif defined(__FreeBSD__) I overlooked it. `

[Lldb-commits] [PATCH] D30981: Remove HostThreadLinux/Free/NetBSD

2017-03-17 Thread Pavel Labath via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL298058: Remove HostThreadLinux/Free/NetBSD (authored by labath). Changed prior to commit: https://reviews.llvm.org/D30981?vs=91869&id=92115#toc Repository: rL LLVM https://reviews.llvm.org/D30981 F

Re: [Lldb-commits] [PATCH] D30981: Remove HostThreadLinux/Free/NetBSD

2017-03-15 Thread Zachary Turner via lldb-commits
Only linux needs this now afaict because on all other platforms, you can only get the name of the current thread, not an arbitrary thread, and that use case is covered by llvm. (Even if it *is* possible on other platforms, only linux actually does it with an arbitrary thread) With that in mind, ca

Re: [Lldb-commits] [PATCH] D30981: Remove HostThreadLinux/Free/NetBSD

2017-03-15 Thread Zachary Turner via lldb-commits
Hmm, i see you said freebsd needs this. Ignore my previous comment On Wed, Mar 15, 2017 at 7:33 AM Zachary Turner wrote: > Only linux needs this now afaict because on all other platforms, you can > only get the name of the current thread, not an arbitrary thread, and that > use case is covered by