summaryrefslogtreecommitdiffstats
path: root/source/Host/common/NativeProcessProtocol.cpp
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2015-02-06 21:38:51 +0000
committeremaste <emaste@FreeBSD.org>2015-02-06 21:38:51 +0000
commit0c2019f4ca6b2dc6d710f6bb16a0e3ed10271531 (patch)
tree09bc83f73246ee3c7a779605cd0122093d2a8a19 /source/Host/common/NativeProcessProtocol.cpp
parent01ee1789d6aa7294e5966a97f8d29387f6f81699 (diff)
downloadFreeBSD-src-0c2019f4ca6b2dc6d710f6bb16a0e3ed10271531.zip
FreeBSD-src-0c2019f4ca6b2dc6d710f6bb16a0e3ed10271531.tar.gz
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
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