summaryrefslogtreecommitdiffstats
path: root/source/Host/common/NativeProcessProtocol.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Host/common/NativeProcessProtocol.cpp')
-rw-r--r--source/Host/common/NativeProcessProtocol.cpp23
1 files changed, 21 insertions, 2 deletions
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
{
OpenPOWER on IntegriCloud