public string AttachToProcess(int pid, string preAttachCommand) { var gdbStart = new liblinux.Services.GdbServerStartInfo(); gdbStart.ProcessId = pid; // indicates an attach operation gdbStart.PreLaunchCommand = preAttachCommand; _gdbserver = _remoteSystem.Services.GdbServer.Start(gdbStart); // throws on failure return "localhost:" + _gdbserver.StartInfo.LocalPort.ToString(CultureInfo.InvariantCulture); }
internal void Clean() { if (_gdbserver != null) { _gdbserver.Stop(); _gdbserver = null; } if (_remoteSystem != null) { _remoteSystem.Dispose(); _remoteSystem = null; } }
public override void Close() { if (_gdbserver != null) { _gdbserver.Stop(); _gdbserver = null; } if (_remoteSystem != null) { _remoteSystem.Dispose(); _remoteSystem = null; } }