Skip to content

Instantly share code, notes, and snippets.

@toptensoftware
Created October 23, 2016 12:19
Show Gist options
  • Select an option

  • Save toptensoftware/c6fb5703966e5ceda7dd023f11d8612f to your computer and use it in GitHub Desktop.

Select an option

Save toptensoftware/c6fb5703966e5ceda7dd023f11d8612f to your computer and use it in GitHub Desktop.
Sharp86 Step and Step Over
// Single Step
void SingleStep()
{
_break = true;
}
// Step Over
public void StepOver()
{
// Check if the current instruction is a call instruction
var instruction = _disassembler.Read(_cpu.cs, _cpu.ip);
if (_disassembler.IsCall)
{
// Disassembler IP points to next instruction
_tempBreakPoint = new CodeBreakPoint(_disassembler.cs, _disassembler.ip);
}
else
{
SingleStep();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment