Exemplo n.º 1
0
 public Command(SingleSteppingEngine sse, TargetAccessDelegate func, object data)
 {
     this.Type = CommandType.TargetAccess;
     this.Engine = sse;
     this.Data1 = func;
     this.Data2 = data;
 }
Exemplo n.º 2
0
        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);
            }
        }
Exemplo n.º 3
0
 internal override object Invoke(TargetAccessDelegate func, object data)
 {
     throw new InvalidOperationException();
 }
Exemplo n.º 4
0
 internal abstract object Invoke(TargetAccessDelegate func, object data);
Exemplo n.º 5
0
 internal override object Invoke(TargetAccessDelegate func, object data)
 {
     return SendCommand (delegate {
         return func (thread, data);
     });
 }
Exemplo n.º 6
0
        object SendCommand(TargetAccessDelegate target)
        {
            if (inferior == null)
                throw new TargetException (TargetError.NoTarget);

            if (ThreadManager.InBackgroundThread)
                return target (thread, null);
            else
                return manager.SendCommand (this, target, null);
        }
Exemplo n.º 7
0
 object SendCommand(TargetAccessDelegate target)
 {
     return(target(null));
 }
Exemplo n.º 8
0
        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;
        }
Exemplo n.º 9
0
 internal override object Invoke(TargetAccessDelegate func, object data)
 {
     throw new InvalidOperationException ();
 }
Exemplo n.º 10
0
 internal abstract object Invoke(TargetAccessDelegate func, object data);
Exemplo n.º 11
0
 object SendCommand (TargetAccessDelegate target)
 {
         return target (null);
 }