MCPcopy Create free account
hub / github.com/beefytech/Beef / PhysRemoveBreakpoint

Method PhysRemoveBreakpoint

IDEHelper/WinDebugger.cpp:751–770  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

749}
750
751void WinDebugger::PhysRemoveBreakpoint(addr_target address)
752{
753 BfLogDbg("PhysRemoveBreakpoint %p\n", address);
754
755 uint8 origData;
756 DbgMemoryFlags flags = mDebugTarget->ReadOrigImageData(address, &origData, 1);
757 if ((flags & DbgMemoryFlags_Execute) == 0)
758 {
759 //BF_ASSERT("Failed" == 0);
760 return;
761 }
762
763 SIZE_T dwReadBytes;
764 if (!WriteProcessMemory(mProcessInfo.hProcess, (void*)(intptr)address, &origData, 1, &dwReadBytes))
765 {
766 int err = GetLastError();
767 BfLogDbg("RemoveBreakpoint FAILED %p\n", address);
768 }
769 FlushInstructionCache(mProcessInfo.hProcess, (void*)(intptr)address, 1);
770}
771
772void WinDebugger::RemoveBreakpoint(addr_target address)
773{

Callers

nothing calls this directly

Calls 1

ReadOrigImageDataMethod · 0.80

Tested by

no test coverage detected