QueueCommand() public method

Queues the command, it gets sent as soon as gdb is ready for input
public QueueCommand ( GDBCommand cmd ) : void
cmd GDBCommand /// A ///
return void
Ejemplo n.º 1
0
        public override GDBResponseHandler.HandleResponseEnum HandleResponse(GDBSubProcess connector, string[] responseLines, bool allowRequestLine)
        {
            Regex success = new Regex(@"\s*Starting program:\s*", RegexOptions.IgnoreCase | RegexOptions.Compiled);
            Regex success_commit = new Regex(@"\s*The program being debugged has been started already.\s*", RegexOptions.IgnoreCase | RegexOptions.Compiled);

            foreach(string line in responseLines)
            {
                if(success.Match(line).Success)
                {
                    _cb(true);
                    return GDBResponseHandler.HandleResponseEnum.Handled;
                }
                else if(success_commit.Match(line).Success)
                {
                    connector.QueueCommand(new SimpleCmd("y", this, _gdbProc));
                    return GDBResponseHandler.HandleResponseEnum.Handled;
                }
            }

            return GDBResponseHandler.HandleResponseEnum.NotHandled;
        }
Ejemplo n.º 2
0
        public override GDBResponseHandler.HandleResponseEnum HandleResponse(GDBSubProcess connector, string[] responseLines, bool allowRequestLine)
        {
            Regex success = new Regex(@"\s*Continuing.\s*", RegexOptions.IgnoreCase | RegexOptions.Compiled);
            Regex failure = new Regex(@"\s*The program is not being run.\s*", RegexOptions.IgnoreCase | RegexOptions.Compiled);

            foreach(string line in responseLines)
            {
                if(success.Match(line).Success)
                {
                    _cb(true);
                    return GDBResponseHandler.HandleResponseEnum.Handled;
                }
                else if(failure.Match(line).Success)
                {
                    connector.QueueCommand(new RunCmd(_runArgs, _cb, _gdbProc));
                    return GDBResponseHandler.HandleResponseEnum.Handled;
                }
            }

            return GDBResponseHandler.HandleResponseEnum.NotHandled;
        }