rdar://problem/11140741
For "process attach", make the success criterion as the inferior changes its state to eStateStopped. Otherwise, mark it as a failure and say so. llvm-svn: 157036
This commit is contained in:
parent
cd492b0a98
commit
aa739093df
|
@ -541,8 +541,18 @@ public:
|
|||
StateType state = process->WaitForProcessToStop (NULL);
|
||||
|
||||
result.SetDidChangeProcessState (true);
|
||||
result.AppendMessageWithFormat ("Process %llu %s\n", process->GetID(), StateAsCString (state));
|
||||
result.SetStatus (eReturnStatusSuccessFinishNoResult);
|
||||
|
||||
if (state == eStateStopped)
|
||||
{
|
||||
result.AppendMessageWithFormat ("Process %llu %s\n", process->GetID(), StateAsCString (state));
|
||||
result.SetStatus (eReturnStatusSuccessFinishNoResult);
|
||||
}
|
||||
else
|
||||
{
|
||||
result.AppendError ("attach failed: process did not stop (no such process or permission problem?)");
|
||||
result.SetStatus (eReturnStatusFailed);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue