| 863 | } |
| 864 | |
| 865 | void 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 | |
| 905 | Breakpoint* WinDebugger::FindBreakpointAt(intptr address) |
| 906 | { |
nothing calls this directly
no test coverage detected