SBTarget::Attach(SBAttachInfo &) was changed to not be asynchronous back in February and this affected Xcode's abililty to cancel an attach to process by name.
Added the ability to specify if an attach by name should be synchronous or not in SBAttachInfo and ProcessAttachInfo.
<rdar://problem/22821480>
llvm-svn: 249361
diff --git a/lldb/source/API/SBAttachInfo.cpp b/lldb/source/API/SBAttachInfo.cpp
index 07446df..0f2ab7a 100644
--- a/lldb/source/API/SBAttachInfo.cpp
+++ b/lldb/source/API/SBAttachInfo.cpp
@@ -36,6 +36,15 @@
m_opaque_sp->SetWaitForLaunch (wait_for);
}
+SBAttachInfo::SBAttachInfo (const char *path, bool wait_for, bool async) :
+ m_opaque_sp (new ProcessAttachInfo())
+{
+ if (path && path[0])
+ m_opaque_sp->GetExecutableFile().SetFile(path, false);
+ m_opaque_sp->SetWaitForLaunch (wait_for);
+ m_opaque_sp->SetAsync(async);
+}
+
SBAttachInfo::SBAttachInfo (const SBAttachInfo &rhs) :
m_opaque_sp (new ProcessAttachInfo())
{
@@ -127,6 +136,13 @@
m_opaque_sp->SetWaitForLaunch (b);
}
+void
+SBAttachInfo::SetWaitForLaunch (bool b, bool async)
+{
+ m_opaque_sp->SetWaitForLaunch (b);
+ m_opaque_sp->SetAsync(async);
+}
+
bool
SBAttachInfo::GetIgnoreExisting ()
{