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.
llvm-svn: 133785
diff --git a/lldb/source/API/SBProcess.cpp b/lldb/source/API/SBProcess.cpp
index 2ebf7f6..521c1a6 100644
--- a/lldb/source/API/SBProcess.cpp
+++ b/lldb/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());