internal CommandResult StartOperation(ThreadingModel model, SingleSteppingEngine caller)
{
if (!ThreadManager.InBackgroundThread)
throw new InternalError ();
if ((model & ThreadingModel.ThreadingMode) == ThreadingModel.Default) {
if (Inferior.HasThreadEvents)
model |= ThreadingModel.Single;
else
model |= ThreadingModel.Process;
}
if ((model & ThreadingModel.ThreadingMode) != ThreadingModel.Global)
return caller.Process.StartOperation (model, caller);
if (current_operation != null)
throw new TargetException (TargetError.NotStopped);
lock (this) {
stopped_event.Reset ();
current_operation = new GlobalCommandResult (this, model);
}
foreach (Process process in process_hash.Values) {
process.StartGlobalOperation (model, caller, current_operation);
}
return current_operation;
}