Hmm, i see you said freebsd needs this.  Ignore my previous comment <br><div class="gmail_quote"><div dir="ltr">On Wed, Mar 15, 2017 at 7:33 AM Zachary Turner <<a href="mailto:zturner@google.com">zturner@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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)<br class="gmail_msg"><br class="gmail_msg">With that in mind, can we just delete it and have NativeProcessLinux directly call the ProcFileReader?<br class="gmail_msg"><div class="gmail_quote gmail_msg"><div dir="ltr" class="gmail_msg">On Wed, Mar 15, 2017 at 7:14 AM Pavel Labath via Phabricator <<a href="mailto:reviews@reviews.llvm.org" class="gmail_msg" target="_blank">reviews@reviews.llvm.org</a>> wrote:<br class="gmail_msg"></div><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">labath created this revision.<br class="gmail_msg">
Herald added a subscriber: mgorny.<br class="gmail_msg">
<br class="gmail_msg">
These classes existed only because of the GetName() static function,<br class="gmail_msg">
which can be moved to a more natural place anyway. I move the linux<br class="gmail_msg">
version to NativeProcessLinux (and get rid of ProcFileReader), the<br class="gmail_msg">
freebsd version to ProcessFreeBSD (and fix a bug where it was using the<br class="gmail_msg">
current process ID, instead of the inferior pid), and remove the NetBSD<br class="gmail_msg">
version (which was probably incorrect anyway, as it assumes the current<br class="gmail_msg">
process instead of the inferior.<br class="gmail_msg">
<br class="gmail_msg">
I also add an llgs test to that verifies thread names are read<br class="gmail_msg">
correctly.<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<a href="https://reviews.llvm.org/D30981" rel="noreferrer" class="gmail_msg" target="_blank">https://reviews.llvm.org/D30981</a><br class="gmail_msg">
<br class="gmail_msg">
Files:<br class="gmail_msg">
  include/lldb/Host/HostNativeThread.h<br class="gmail_msg">
  include/lldb/Host/HostNativeThreadForward.h<br class="gmail_msg">
  include/lldb/Host/freebsd/HostThreadFreeBSD.h<br class="gmail_msg">
  include/lldb/Host/linux/HostThreadLinux.h<br class="gmail_msg">
  include/lldb/Host/netbsd/HostThreadNetBSD.h<br class="gmail_msg">
  packages/Python/lldbsuite/test/tools/lldb-server/thread-name/Makefile<br class="gmail_msg">
  packages/Python/lldbsuite/test/tools/lldb-server/thread-name/TestGdbRemoteThreadName.py<br class="gmail_msg">
  packages/Python/lldbsuite/test/tools/lldb-server/thread-name/main.cpp<br class="gmail_msg">
  source/Host/CMakeLists.txt<br class="gmail_msg">
  source/Host/freebsd/HostThreadFreeBSD.cpp<br class="gmail_msg">
  source/Host/linux/HostThreadLinux.cpp<br class="gmail_msg">
  source/Host/netbsd/HostThreadNetBSD.cpp<br class="gmail_msg">
  source/Plugins/Process/FreeBSD/FreeBSDThread.cpp<br class="gmail_msg">
  source/Plugins/Process/Linux/NativeThreadLinux.cpp<br class="gmail_msg">
<br class="gmail_msg">
</blockquote></div></blockquote></div>