Fixed SBTarget attach calls to properly deal with being connected to a remotely
connected process connection.
Also added support for more kinds of continue packet when multiple threads
need to continue where some want to continue with signals.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133785 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBProcess.cpp b/source/API/SBProcess.cpp
index 2ebf7f6..521c1a6 100644
--- a/source/API/SBProcess.cpp
+++ b/source/API/SBProcess.cpp
@@ -479,15 +479,15 @@
SBError
SBProcess::Continue ()
{
- Mutex::Locker api_locker (m_opaque_sp->GetTarget().GetAPIMutex());
-
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBProcess(%p)::Continue ()...", m_opaque_sp.get());
SBError sb_error;
- if (IsValid())
+ if (m_opaque_sp)
{
+ Mutex::Locker api_locker (m_opaque_sp->GetTarget().GetAPIMutex());
+
Error error (m_opaque_sp->Resume());
if (error.Success())
{
@@ -545,7 +545,7 @@
SBProcess::Stop ()
{
SBError sb_error;
- if (IsValid())
+ if (m_opaque_sp)
{
Mutex::Locker api_locker (m_opaque_sp->GetTarget().GetAPIMutex());
sb_error.SetError (m_opaque_sp->Halt());