MCPcopy Create free account
hub / github.com/Vector35/debugger / RemoveBreakpoint

Method RemoveBreakpoint

core/adapters/dbgengadapter.cpp:856–883  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

854}
855
856bool DbgEngAdapter::RemoveBreakpoint(const DebugBreakpoint& breakpoint)
857{
858 bool done = false;
859 ULONG numBreakpoints {};
860 if (m_debugControl->GetNumberBreakpoints(&numBreakpoints) != S_OK)
861 return false;
862
863 for (size_t i = 0; i < numBreakpoints; i++)
864 {
865 IDebugBreakpoint2* bp {};
866 if (m_debugControl->GetBreakpointByIndex2(i, &bp) != S_OK)
867 continue;
868
869 ULONG64 address {};
870 if (bp->GetOffset(&address) != S_OK)
871 continue;
872
873 // Right now, only the address info of the breakpoint is valid.
874 // Once the ID info is also valid, we can call GetBreakpointById2() to get the breakpoint by ID.
875 if (address == breakpoint.m_address)
876 {
877 m_debugControl->RemoveBreakpoint2(bp);
878 done = true;
879 break;
880 }
881 }
882 return done;
883}
884
885bool DbgEngAdapter::RemoveBreakpoint(const ModuleNameAndOffset& breakpoint)
886{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected