From 205afe679855a4ce8149cdaa94d3f0868ce796dc Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Fri, 6 Feb 2015 21:38:51 +0000 Subject: Import LLDB as of upstream SVN r225923 (git 2b588ecd) This corresponds with the branchpoint for the 3.6 release. A number of files not required for the FreeBSD build have been removed. Sponsored by: DARPA, AFRL --- source/Host/common/NativeProcessProtocol.cpp | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'source/Host/common/NativeProcessProtocol.cpp') diff --git a/source/Host/common/NativeProcessProtocol.cpp b/source/Host/common/NativeProcessProtocol.cpp index b7a77266c58c6..e192f19a8896e 100644 --- a/source/Host/common/NativeProcessProtocol.cpp +++ b/source/Host/common/NativeProcessProtocol.cpp @@ -13,6 +13,7 @@ #include "lldb/Core/ArchSpec.h" #include "lldb/Core/Log.h" #include "lldb/Core/State.h" +#include "lldb/Host/Host.h" #include "lldb/Target/NativeRegisterContext.h" #include "NativeThreadProtocol.h" @@ -43,6 +44,18 @@ NativeProcessProtocol::NativeProcessProtocol (lldb::pid_t pid) : { } +lldb_private::Error +NativeProcessProtocol::Interrupt () +{ + Error error; +#if !defined (SIGSTOP) + error.SetErrorString ("local host does not support signaling"); + return error; +#else + return Signal (SIGSTOP); +#endif +} + lldb_private::Error NativeProcessProtocol::GetMemoryRegionInfo (lldb::addr_t load_addr, MemoryRegionInfo &range_info) { @@ -110,9 +123,8 @@ NativeProcessProtocol::GetThreadAtIndex (uint32_t idx) } NativeThreadProtocolSP -NativeProcessProtocol::GetThreadByID (lldb::tid_t tid) +NativeProcessProtocol::GetThreadByIDUnlocked (lldb::tid_t tid) { - Mutex::Locker locker (m_threads_mutex); for (auto thread_sp : m_threads) { if (thread_sp->GetID() == tid) @@ -121,6 +133,13 @@ NativeProcessProtocol::GetThreadByID (lldb::tid_t tid) return NativeThreadProtocolSP (); } +NativeThreadProtocolSP +NativeProcessProtocol::GetThreadByID (lldb::tid_t tid) +{ + Mutex::Locker locker (m_threads_mutex); + return GetThreadByIDUnlocked (tid); +} + bool NativeProcessProtocol::IsAlive () const { -- cgit v1.2.3