示例#1
0
        private void Connect()
        {
            if (GDBConnector != null)
            {
                GDBConnector.Disconnect();
                MemoryCache = null;
            }

            GDBConnector = new Connector(new X86Platform(), Options.GDBHost, Options.GDBPort);

            GDBConnector.Connect();
            GDBConnector.OnPause   = OnPause;
            GDBConnector.OnRunning = OnRunning;

            if (!GDBConnector.IsConnected)
            {
                MessageBox.Show($"Could not connect to '{GDBConnector.ConnectionHost}' on port {GDBConnector.ConnectionPort.ToString()}.");
                return;
            }

            GDBConnector.ExtendedMode();
            GDBConnector.ClearAllBreakPoints();
            ResendBreakPoints();
            MemoryCache = new MemoryCache(GDBConnector);
        }
示例#2
0
 private void Disconnect()
 {
     if (GDBConnector != null)
     {
         GDBConnector.Disconnect();
         GDBConnector = null;
         MemoryCache  = null;
     }
 }
示例#3
0
        private void MainForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            if (GDBConnector != null)
            {
                GDBConnector.Disconnect();
                GDBConnector = null;
            }

            if (VMProcess?.HasExited == false)
            {
                VMProcess.Kill();
            }
        }