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

llvm-svn: 180831
This commit is contained in:
Jim Ingham
2013-04-30 23:46:08 +00:00
parent 3ca3cd1ed7
commit a23f73dbbc
14 changed files with 221 additions and 30 deletions

View File

@@ -785,13 +785,21 @@ SBProcess::Kill ()
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");