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); }
private void Disconnect() { if (GDBConnector != null) { GDBConnector.Disconnect(); GDBConnector = null; MemoryCache = null; } }
private void MainForm_FormClosed(object sender, FormClosedEventArgs e) { if (GDBConnector != null) { GDBConnector.Disconnect(); GDBConnector = null; } if (VMProcess?.HasExited == false) { VMProcess.Kill(); } }