summaryrefslogtreecommitdiffstats
path: root/lldb/source
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source')
-rw-r--r--lldb/source/Host/freebsd/HostThreadFreeBSD.cpp6
-rw-r--r--lldb/source/Host/freebsd/ThisThread.cpp3
-rw-r--r--lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.h4
3 files changed, 7 insertions, 6 deletions
diff --git a/lldb/source/Host/freebsd/HostThreadFreeBSD.cpp b/lldb/source/Host/freebsd/HostThreadFreeBSD.cpp
index f1954875f9a..4f3fd312cc9 100644
--- a/lldb/source/Host/freebsd/HostThreadFreeBSD.cpp
+++ b/lldb/source/Host/freebsd/HostThreadFreeBSD.cpp
@@ -40,7 +40,7 @@ HostThreadFreeBSD::SetName(lldb::thread_t thread, llvm::StringRef name)
}
void
-HostThreadFreeBSD::GetName(lldb::thread_t thread, llvm::SmallVectorImpl<char> &name)
+HostThreadFreeBSD::GetName(lldb::tid_t tid, llvm::SmallVectorImpl<char> &name)
{
name.clear();
int pid = Host::GetCurrentProcessID();
@@ -73,9 +73,9 @@ HostThreadFreeBSD::GetName(lldb::thread_t thread, llvm::SmallVectorImpl<char> &n
for (size_t i = 0; i < len / sizeof(*kp); i++)
{
- if (kp[i].ki_tid == (int)thread)
+ if (kp[i].ki_tid == (lwpid_t)tid)
{
- name.append(kp[i].ki_tdname, strlen(kp[i].ki_tdname));
+ name.append(kp[i].ki_tdname, kp[i].ki_tdname + strlen(kp[i].ki_tdname));
break;
}
}
diff --git a/lldb/source/Host/freebsd/ThisThread.cpp b/lldb/source/Host/freebsd/ThisThread.cpp
index 1c68c8ba16d..a9f805885e8 100644
--- a/lldb/source/Host/freebsd/ThisThread.cpp
+++ b/lldb/source/Host/freebsd/ThisThread.cpp
@@ -13,6 +13,7 @@
#include "llvm/ADT/SmallVector.h"
#include <pthread.h>
+#include <pthread_np.h>
using namespace lldb_private;
@@ -25,5 +26,5 @@ ThisThread::SetName(llvm::StringRef name)
void
ThisThread::GetName(llvm::SmallVectorImpl<char> &name)
{
- HostNativeThread::GetName(::pthread_self(), name);
+ HostNativeThread::GetName(::pthread_getthreadid_np(), name);
}
diff --git a/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.h b/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.h
index 0f319348b46..68bf2f80051 100644
--- a/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.h
+++ b/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.h
@@ -213,8 +213,8 @@ public:
private:
ProcessFreeBSD *m_process;
- HostThread m_operation_thread;
- HostThread m_monitor_thread;
+ lldb_private::HostThread m_operation_thread;
+ lldb_private::HostThread m_monitor_thread;
lldb::pid_t m_pid;
int m_terminal_fd;
OpenPOWER on IntegriCloud