Added an option to "process detach" to keep the process stopped, if the process plugin (or in the
case of ProcessGDBRemote the stub we are talking to) know how to do that.
rdar://problem/13680832
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180831 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBProcess.cpp b/source/API/SBProcess.cpp
index ba45ce5..f04fed2 100644
--- a/source/API/SBProcess.cpp
+++ b/source/API/SBProcess.cpp
@@ -786,12 +786,20 @@
SBError
SBProcess::Detach ()
{
+ // FIXME: This should come from a process default.
+ bool keep_stopped = false;
+ Detach (keep_stopped);
+}
+
+SBError
+SBProcess::Detach (bool keep_stopped)
+{
SBError sb_error;
ProcessSP process_sp(GetSP());
if (process_sp)
{
Mutex::Locker api_locker (process_sp->GetTarget().GetAPIMutex());
- sb_error.SetError (process_sp->Detach());
+ sb_error.SetError (process_sp->Detach(keep_stopped));
}
else
sb_error.SetErrorString ("SBProcess is invalid");