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

Method ValidateBreakpoints

IDEHelper/WinDebugger.cpp:865–903  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

863}
864
865void WinDebugger::ValidateBreakpoints()
866{
867 HashSet<addr_target> usedBreakpoints;
868
869 std::function<void(WdBreakpoint*)> _AddBreakpoint = [&](WdBreakpoint* breakpoint)
870 {
871 if (breakpoint->mAddr != 0)
872 {
873 usedBreakpoints.Add(breakpoint->mAddr);
874
875 WdBreakpoint* foundBreakpoint = NULL;
876 auto itr = mBreakpointAddrMap.Find(breakpoint->mAddr);
877 bool found = false;
878 while (itr != mBreakpointAddrMap.end())
879 {
880 WdBreakpoint* foundBreakpoint = itr->mValue;
881 found |= foundBreakpoint == breakpoint;
882 itr.NextWithSameKey(breakpoint->mAddr);
883 }
884
885 BF_ASSERT(found);
886 }
887
888 auto checkSibling = (WdBreakpoint*)breakpoint->mLinkedSibling;
889 while (checkSibling != NULL)
890 {
891 _AddBreakpoint(checkSibling);
892 checkSibling = (WdBreakpoint*)checkSibling->mLinkedSibling;
893 }
894 };
895
896 for (auto breakpoint : mBreakpoints)
897 _AddBreakpoint(breakpoint);
898
899 for (auto& entry : mBreakpointAddrMap)
900 {
901 BF_ASSERT(usedBreakpoints.Contains(entry.mKey));
902 }
903}
904
905Breakpoint* WinDebugger::FindBreakpointAt(intptr address)
906{

Callers

nothing calls this directly

Calls 5

NextWithSameKeyMethod · 0.80
AddMethod · 0.45
FindMethod · 0.45
endMethod · 0.45
ContainsMethod · 0.45

Tested by

no test coverage detected