public void Kill() { var command = new Kill(); GDBClient.SendCommand(command); Disconnect(); }
public void ReadMemory(ulong address, uint size, OnMemoryRead onMemoryRead) { var command = new ReadMemory(address, size, OnMemoryRead); OnMemoryReadMap.Add(command, onMemoryRead); GDBClient.SendCommand(command); }
private static void Main() { var tcpClient = new TcpClient("localhost", 2345); var gdbClient = new GDBClient(); gdbClient.Stream = new GDBNetworkStream(tcpClient.Client, true); gdbClient.SendCommand(new ReadMemory(0x0, 2, ReadMemory)); //gdbClient.SendCommandAsync(new SetSoftwareBreakPoint(0x400030, 1, Response)); gdbClient.SendCommand(new SetSoftwareBreakPoint(0x4571B9, 1, Response)); gdbClient.SendCommand(new GetRegisters(GetRegisters)); gdbClient.SendCommand(new Continue(Response)); Thread.Sleep(2000); gdbClient.SendBreak(); gdbClient.SendCommand(new GetRegisters(GetRegisters)); gdbClient.SendCommand(new Continue(Response)); Thread.Sleep(2000); gdbClient.SendBreak(); gdbClient.SendCommand(new GetRegisters(GetRegisters)); //0x400030 //gdbClient.SendCommandAsync(new GeneralRegisterRead(Response)); while (true) { //loop } }
public void Kill() { var command = new Kill(); GDBClient.SendCommand(command); Thread.Sleep(100); // give it time to terminate Disconnect(); }
public void Step(bool skipOnStep = false) { if (IsRunning) { return; } IsPaused = false; CallOnRunning(); var command = skipOnStep ? new Step(OnStepQuiet) : new Step(OnStep); GDBClient.SendCommand(command); }
public void Continue() { if (IsRunning) { return; } IsPaused = false; CallOnRunning(); var command = new Continue(OnStop); GDBClient.SendCommand(command); }
public void StepN(uint stepCount) { if (IsRunning) { return; } var command = new Step(); for (uint currentStep = 0; currentStep < stepCount - 1; currentStep++) { GDBClient.SendCommand(command); } Step(); }
public void GetRegisters() { var command = new GetRegisters(OnGetRegisters); GDBClient.SendCommand(command); }
public void ClearBreakPoint(ulong address) { var command = new ClearBreakPoint(address, 4, 0); GDBClient.SendCommand(command); }
public void ExtendedMode() { var command = new ExtendedMode(); GDBClient.SendCommand(command); }
public void GetReasonHalted() { var command = new GetReasonHalted(); GDBClient.SendCommand(command); }