From b3788eaf9976ce0323f886fda0bd510cfe8a2dea Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Mon, 5 Oct 2015 22:58:37 +0000 Subject: 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. llvm-svn: 249361 --- lldb/source/API/SBAttachInfo.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'lldb/source/API') diff --git a/lldb/source/API/SBAttachInfo.cpp b/lldb/source/API/SBAttachInfo.cpp index 07446df27df..0f2ab7afc9c 100644 --- a/lldb/source/API/SBAttachInfo.cpp +++ b/lldb/source/API/SBAttachInfo.cpp @@ -36,6 +36,15 @@ SBAttachInfo::SBAttachInfo (const char *path, bool wait_for) : 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 @@ SBAttachInfo::SetWaitForLaunch (bool b) 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 () { -- cgit v1.2.3