Example #1
0
            public ReplBackend(ReplProcessor replProcessor, JSession jSession)
            {
                this._replProc = replProcessor;
                this._COMMANDS = new Dictionary <string, Action>()
                {
                    { "run ", this.CmdRun },
                    { "abrt", this.CmdAbrt },
                    { "exit", this.CmdExit },
                    { "mems", this.CmdMems },
                    { "sigs", this.CmdSigs },
                    { "locs", this.CmdLocs },
                    { "setl", this.CmdSetl },
                    { "sett", this.CmdSett },
                    { "inpl", this.CmdInpl },
                    { "excf", this.CmdExcf },
                    { "dbga", this.CmdDebugAttach }
                };
                this._jSession = jSession;
                this._disposed = false;

                this._conn        = null;
                this._stream      = null;
                this._sendLocker  = new object();
                this._inputLocker = new object();
                this._inputEvent  = new InputLock(this); // lock starts acquired (we use it like a manual reset event)

                this._inputString   = null;
                this._exitRequested = false;
            }
Example #2
0
 /// <summary>
 /// reads a line of input from standard input
 /// </summary>
 protected string ReadLine()
 {
     using (new SendLock(this))
     {
         this._stream.Write(ReplBackend._RDLN);
     }
     this._inputEvent = new InputLock(this);
     return(this._inputString);
 }
Example #3
0
        public bool TryGetDebugPositionsHistory(ref List <Vec3> p)
        {
            if (InputLock.TryEnterReadLock(0))
            {
                p = new List <Vec3>(m_DebugPositionsHistory);
                InputLock.ExitReadLock();
                return(true);
            }

            return(false);
        }
Example #4
0
        public bool TryGetBackTrackPath(ref List <Vec3> p)
        {
            if (InputLock.TryEnterReadLock(0))
            {
                p = new List <Vec3>(m_DestinationsHistory);
                p.Reverse();
                InputLock.ExitReadLock();
                return(true);
            }

            return(false);
        }
Example #5
0
 /// <summary>
 /// reads a line of input from standard input
 /// </summary>
 protected string ReadLine()
 {
     using (new SendLock(this))
     {
         this._stream.Write(ReplBackend._RDLN);
     }
     this._inputEvent = new InputLock(this);
     return this._inputString;
 }
Example #6
0
            public ReplBackend(ReplProcessor replProcessor, JSession jSession)
            {
                this._replProc = replProcessor;
                this._COMMANDS = new Dictionary<string, Action>()
                {
                    { "run ", this.CmdRun },
                    { "abrt", this.CmdAbrt },
                    { "exit", this.CmdExit },
                    { "mems", this.CmdMems },
                    { "sigs", this.CmdSigs },
                    { "locs", this.CmdLocs },
                    { "setl", this.CmdSetl },
                    { "sett", this.CmdSett },
                    { "inpl", this.CmdInpl },
                    { "excf", this.CmdExcf },
                    { "dbga", this.CmdDebugAttach }
                };
                this._jSession = jSession;
                this._disposed = false;

                this._conn = null;
                this._stream = null;
                this._sendLocker = new object();
                this._inputLocker = new object();
                this._inputEvent = new InputLock(this); // lock starts acquired (we use it like a manual reset event)

                this._inputString = null;
                this._exitRequested = false;
            }