summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/POSIX/POSIXThread.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2014-09-09 20:54:56 +0000
committerZachary Turner <zturner@google.com>2014-09-09 20:54:56 +0000
commit39de3110712cb4547a835777310dbead46c1a002 (patch)
treed0f99eb4b7f8ab35272587ad4a0e070675752b54 /lldb/source/Plugins/Process/POSIX/POSIXThread.cpp
parent7decae153bdb4b4a98fa48bb27564fa4597d1cfa (diff)
downloadbcm5719-llvm-39de3110712cb4547a835777310dbead46c1a002.tar.gz
bcm5719-llvm-39de3110712cb4547a835777310dbead46c1a002.zip
Create a HostThread abstraction.
This patch moves creates a thread abstraction that represents a thread running inside the LLDB process. This is a replacement for otherwise using lldb::thread_t, and provides a platform agnostic interface to managing these threads. Differential Revision: http://reviews.llvm.org/D5198 Reviewed by: Jim Ingham llvm-svn: 217460
Diffstat (limited to 'lldb/source/Plugins/Process/POSIX/POSIXThread.cpp')
-rw-r--r--lldb/source/Plugins/Process/POSIX/POSIXThread.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/POSIX/POSIXThread.cpp b/lldb/source/Plugins/Process/POSIX/POSIXThread.cpp
index d48f8f9dd30..c6c646915d5 100644
--- a/lldb/source/Plugins/Process/POSIX/POSIXThread.cpp
+++ b/lldb/source/Plugins/Process/POSIX/POSIXThread.cpp
@@ -20,11 +20,13 @@
#include "lldb/Core/Debugger.h"
#include "lldb/Core/State.h"
#include "lldb/Host/Host.h"
+#include "lldb/Host/HostNativeThread.h"
#include "lldb/Host/HostInfo.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/StopInfo.h"
#include "lldb/Target/Target.h"
#include "lldb/Target/ThreadSpec.h"
+#include "llvm/ADT/SmallString.h"
#include "POSIXStopInfo.h"
#include "POSIXThread.h"
#include "ProcessPOSIX.h"
@@ -140,7 +142,9 @@ POSIXThread::GetName ()
{
if (!m_thread_name_valid)
{
- SetName(Host::GetThreadName(GetProcess()->GetID(), GetID()).c_str());
+ llvm::SmallString<32> thread_name;
+ HostNativeThread::GetName(GetID(), thread_name);
+ m_thread_name = thread_name.c_str();
m_thread_name_valid = true;
}
OpenPOWER on IntegriCloud