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

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 15 07:35:26 PDT 2017


Hmm, i see you said freebsd needs this. Ignore my previous comment
On Wed, Mar 15, 2017 at 7:33 AM Zachary Turner <zturner at google.com> 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 llvm. (Even if it *is* possible on other platforms,
> only linux actually does it with an arbitrary thread)
>
> With that in mind, can we just delete it and have NativeProcessLinux
> directly call the ProcFileReader?
> On Wed, Mar 15, 2017 at 7:14 AM Pavel Labath via Phabricator <
> reviews at reviews.llvm.org> wrote:
>
> 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 ProcessFreeBSD (and fix a bug where it was using the
> current process ID, instead of the inferior pid), and remove the NetBSD
> version (which was probably incorrect anyway, as it assumes the current
> process instead of the inferior.
>
> I also add an llgs test to that verifies thread names are read
> correctly.
>
>
> https://reviews.llvm.org/D30981
>
> Files:
>   include/lldb/Host/HostNativeThread.h
>   include/lldb/Host/HostNativeThreadForward.h
>   include/lldb/Host/freebsd/HostThreadFreeBSD.h
>   include/lldb/Host/linux/HostThreadLinux.h
>   include/lldb/Host/netbsd/HostThreadNetBSD.h
>   packages/Python/lldbsuite/test/tools/lldb-server/thread-name/Makefile
>
> packages/Python/lldbsuite/test/tools/lldb-server/thread-name/TestGdbRemoteThreadName.py
>   packages/Python/lldbsuite/test/tools/lldb-server/thread-name/main.cpp
>   source/Host/CMakeLists.txt
>   source/Host/freebsd/HostThreadFreeBSD.cpp
>   source/Host/linux/HostThreadLinux.cpp
>   source/Host/netbsd/HostThreadNetBSD.cpp
>   source/Plugins/Process/FreeBSD/FreeBSDThread.cpp
>   source/Plugins/Process/Linux/NativeThreadLinux.cpp
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20170315/79defa1f/attachment.html>


More information about the lldb-commits mailing list