summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/Linux/NativeThreadLinux.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/Linux/NativeThreadLinux.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/Linux/NativeThreadLinux.cpp')
-rw-r--r--lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
index d9e80d6c459..8e010a55d85 100644
--- a/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
@@ -18,8 +18,12 @@
#include "lldb/Core/State.h"
#include "lldb/Host/Host.h"
#include "lldb/Host/HostInfo.h"
+#include "lldb/Host/HostNativeThread.h"
#include "lldb/lldb-enumerations.h"
#include "lldb/lldb-private-log.h"
+
+#include "llvm/ADT/SmallString.h"
+
#include "Plugins/Process/Utility/RegisterContextLinux_arm64.h"
#include "Plugins/Process/Utility/RegisterContextLinux_i386.h"
#include "Plugins/Process/Utility/RegisterContextLinux_x86_64.h"
@@ -65,7 +69,9 @@ NativeThreadLinux::GetName()
return "<unknown: no process>";
// const NativeProcessLinux *const process = reinterpret_cast<NativeProcessLinux*> (process_sp->get ());
- return Host::GetThreadName (process_sp->GetID (), GetID ()).c_str ();
+ llvm::SmallString<32> thread_name;
+ HostNativeThread::GetName(GetID(), thread_name);
+ return thread_name.c_str();
}
lldb::StateType
OpenPOWER on IntegriCloud