internal object SendCommand(SingleSteppingEngine sse, TargetAccessDelegate target,
object user_data)
{
Command command = new Command (sse, target, user_data);
if (!engine_event.WaitOne (WaitTimeout, false))
throw new TargetException (TargetError.NotStopped);
event_queue.Lock ();
engine_event.Reset ();
current_command = command;
event_queue.Signal ();
event_queue.Unlock ();
engine_event.WaitOne ();
if (command.Result is Exception)
throw (Exception) command.Result;
else
return command.Result;
}