From 39de3110712cb4547a835777310dbead46c1a002 Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Tue, 9 Sep 2014 20:54:56 +0000 Subject: 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 --- lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp') diff --git a/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp index d9e80d6c4595..8e010a55d852 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 ""; // const NativeProcessLinux *const process = reinterpret_cast (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 -- cgit v1.2.3