From 0c2019f4ca6b2dc6d710f6bb16a0e3ed10271531 Mon Sep 17 00:00:00 2001 From: emaste 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 b7a7726..e192f19 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" @@ -44,6 +45,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) { // Default: not implemented. @@ -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.1