summaryrefslogtreecommitdiffstats
path: root/lldb/include/lldb/API/SBAttachInfo.h
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2015-10-05 22:58:37 +0000
committerGreg Clayton <gclayton@apple.com>2015-10-05 22:58:37 +0000
commitb3788eaf9976ce0323f886fda0bd510cfe8a2dea (patch)
tree9c1c1a9f01e19d5ad5786c348da62f2bd5058b67 /lldb/include/lldb/API/SBAttachInfo.h
parent41127ad7af1ff9b9573e402f599024bd24d18110 (diff)
downloadbcm5719-llvm-b3788eaf9976ce0323f886fda0bd510cfe8a2dea.tar.gz
bcm5719-llvm-b3788eaf9976ce0323f886fda0bd510cfe8a2dea.zip
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
Diffstat (limited to 'lldb/include/lldb/API/SBAttachInfo.h')
-rw-r--r--lldb/include/lldb/API/SBAttachInfo.h75
1 files changed, 75 insertions, 0 deletions
diff --git a/lldb/include/lldb/API/SBAttachInfo.h b/lldb/include/lldb/API/SBAttachInfo.h
index 712150e128b..a246d9919cf 100644
--- a/lldb/include/lldb/API/SBAttachInfo.h
+++ b/lldb/include/lldb/API/SBAttachInfo.h
@@ -23,8 +23,47 @@ public:
SBAttachInfo (lldb::pid_t pid);
+ //------------------------------------------------------------------
+ /// Attach to a process by name.
+ ///
+ /// This function implies that a future call to SBTarget::Attach(...)
+ /// will be synchronous.
+ ///
+ /// @param[in] path
+ /// A full or partial name for the process to attach to.
+ ///
+ /// @param[in] wait_for
+ /// If \b false, attach to an existing process whose name matches.
+ /// If \b true, then wait for the next process whose name matches.
+ //------------------------------------------------------------------
SBAttachInfo (const char *path, bool wait_for);
+ //------------------------------------------------------------------
+ /// Attach to a process by name.
+ ///
+ /// Future calls to SBTarget::Attach(...) will be synchronous or
+ /// asynchronous depending on the \a async argument.
+ ///
+ /// @param[in] path
+ /// A full or partial name for the process to attach to.
+ ///
+ /// @param[in] wait_for
+ /// If \b false, attach to an existing process whose name matches.
+ /// If \b true, then wait for the next process whose name matches.
+ ///
+ /// @param[in] async
+ /// If \b false, then the SBTarget::Attach(...) call will be a
+ /// synchronous call with no way to cancel the attach in
+ /// progress.
+ /// If \b true, then the SBTarget::Attach(...) function will
+ /// return immediately and clients are expected to wait for a
+ /// process eStateStopped event if a suitable process is
+ /// eventually found. If the client wants to cancel the event,
+ /// SBProcess::Stop() can be called and an eStateExited process
+ /// event will be delivered.
+ //------------------------------------------------------------------
+ SBAttachInfo (const char *path, bool wait_for, bool async);
+
SBAttachInfo (const SBAttachInfo &rhs);
~SBAttachInfo();
@@ -47,9 +86,45 @@ public:
bool
GetWaitForLaunch ();
+ //------------------------------------------------------------------
+ /// Set attach by process name settings.
+ ///
+ /// Designed to be used after a call to SBAttachInfo::SetExecutable().
+ /// This function implies that a call to SBTarget::Attach(...) will
+ /// be synchronous.
+ ///
+ /// @param[in] wait_for
+ /// If \b false, attach to an existing process whose name matches.
+ /// If \b true, then wait for the next process whose name matches.
+ //------------------------------------------------------------------
void
SetWaitForLaunch (bool b);
+ //------------------------------------------------------------------
+ /// Set attach by process name settings.
+ ///
+ /// Designed to be used after a call to SBAttachInfo::SetExecutable().
+ /// Future calls to SBTarget::Attach(...) will be synchronous or
+ /// asynchronous depending on the \a async argument.
+ ///
+ /// @param[in] wait_for
+ /// If \b false, attach to an existing process whose name matches.
+ /// If \b true, then wait for the next process whose name matches.
+ ///
+ /// @param[in] async
+ /// If \b false, then the SBTarget::Attach(...) call will be a
+ /// synchronous call with no way to cancel the attach in
+ /// progress.
+ /// If \b true, then the SBTarget::Attach(...) function will
+ /// return immediately and clients are expected to wait for a
+ /// process eStateStopped event if a suitable process is
+ /// eventually found. If the client wants to cancel the event,
+ /// SBProcess::Stop() can be called and an eStateExited process
+ /// event will be delivered.
+ //------------------------------------------------------------------
+ void
+ SetWaitForLaunch (bool b, bool async);
+
bool
GetIgnoreExisting ();
OpenPOWER on IntegriCloud