Fix thread name updating in Linux. "thread list" should report correct names always now.
Created new LinuxThread class inherited from POSIXThread and removed linux / freebsd ifdefs
Removed several un-needed set thread name calls
CR (and multiple suggestions): mkopec
llvm-svn: 187545
diff --git a/lldb/source/Plugins/Process/Linux/ProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/ProcessLinux.cpp
index c53a2eb..e503ff0 100644
--- a/lldb/source/Plugins/Process/Linux/ProcessLinux.cpp
+++ b/lldb/source/Plugins/Process/Linux/ProcessLinux.cpp
@@ -23,7 +23,7 @@
#include "ProcessPOSIXLog.h"
#include "Plugins/Process/Utility/InferiorCallPOSIX.h"
#include "ProcessMonitor.h"
-#include "POSIXThread.h"
+#include "LinuxThread.h"
using namespace lldb;
using namespace lldb_private;
@@ -64,7 +64,7 @@
// Constructors and destructors.
ProcessLinux::ProcessLinux(Target& target, Listener &listener, FileSpec *core_file)
- : ProcessPOSIX(target, listener), m_stopping_threads(false), m_core_file(core_file)
+ : ProcessPOSIX(target, listener), m_core_file(core_file), m_stopping_threads(false)
{
#if 0
// FIXME: Putting this code in the ctor and saving the byte order in a
@@ -81,6 +81,7 @@
ProcessLinux::Terminate()
{
}
+
lldb_private::ConstString
ProcessLinux::GetPluginNameStatic()
{
@@ -171,6 +172,13 @@
log->Printf ("ProcessLinux::%s() finished", __FUNCTION__);
}
+// ProcessPOSIX override
+POSIXThread *
+ProcessLinux::CreateNewPOSIXThread(lldb_private::Process &process, lldb::tid_t tid)
+{
+ return new LinuxThread(process, tid);
+}
+
bool
ProcessLinux::CanDebug(Target &target, bool plugin_specified_by_name)
{