public Process Start()
{
if ((debugger != null) || (main_process != null))
throw new TargetException (TargetError.AlreadyHaveTarget);
if (!IsScript)
Print ("Starting program: {0} {1}", Options.File,
String.Join (" ", Options.InferiorArgs));
try {
debugger = new Debugger (config);
new InterpreterEventSink (this, debugger);
CommandResult result;
current_process = main_process = debugger.Run (session, out result);
current_thread = current_process.MainThread;
Wait (result);
return current_process;
} catch (TargetException) {
debugger.Dispose ();
debugger = null;
throw;
}
}