MCPcopy Create free account
hub / github.com/WheretIB/nullc / AddBreakpoint

Method AddBreakpoint

NULLC/Executor_X86.cpp:1782–1799  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1780}
1781
1782bool ExecutorX86::AddBreakpoint(unsigned int instruction, bool oneHit)
1783{
1784 if(instruction > instAddress.size())
1785 {
1786 SafeSprintf(execError, 512, "ERROR: break position out of code range");
1787 return false;
1788 }
1789 while(instruction < instAddress.size() && !instAddress[instruction])
1790 instruction++;
1791 if(instruction >= instAddress.size())
1792 {
1793 SafeSprintf(execError, 512, "ERROR: break position out of code range");
1794 return false;
1795 }
1796 breakInstructions.push_back(Breakpoint(instruction, *instAddress[instruction], oneHit));
1797 *instAddress[instruction] = 0xcc;
1798 return true;
1799}
1800
1801bool ExecutorX86::RemoveBreakpoint(unsigned int instruction)
1802{

Callers

nothing calls this directly

Calls 4

SafeSprintfFunction · 0.70
BreakpointClass · 0.70
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected