Exemple #1
0
        private void debugWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            BackgroundWorker worker = sender as BackgroundWorker;
            var ret = DebugSocket.Connect(IP, PORT, worker);

            if (ret == RunnerConnErr.None)
            {
                Manager.RunnerLayout = DebugSocket.GLData;
                DebugSocket.SendCommand((int)RunnerCommand.StartTarget);
                DebugSocket.Recieve();
                while (true)
                {
                    var is_run_ret = Manager.IsRunning();
                    Manager.Update(is_run_ret);
                    Manager.UpdateAllInstanceVars();

                    // "All Instances"

                    /*
                     * Manager.BeginBatch();
                     * Manager.AddCommand(RunnerCommand.GetInstanceData);
                     * // watches/breakpoints/etc
                     * Manager.EndBatch();
                     * Manager.SendBatch();
                     * bool ok = Manager.Recieve();
                     * if (ok)
                     * {
                     *  Console.WriteLine("Reading inst batch result...");
                     *  Manager.ReadResults();
                     * }
                     */
                }
            }
        }
Exemple #2
0
 public DebuggedProcess(string host, int port)
 {
     bw                     = new System.IO.BinaryWriter(sendStream);
     socket                 = new DebugSocket();
     socket.OnConnect       = OnConnected;
     socket.OnConnectFailed = OnConnectFailed;
     socket.OnReciveMessage = OnReceiveMessage;
     socket.OnClose         = OnClose;
     socket.Connect(host, port);
     Connecting = true;
 }