MCPcopy Create free account
hub / github.com/OpenCppCoverage/OpenCppCoverage / SetBreakPoints

Method SetBreakPoints

CppCoverage/BreakPoint.cpp:61–81  ·  view source on GitHub ↗

-------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

59
60 //-------------------------------------------------------------------------
61 BreakPoint::InstructionCollection
62 BreakPoint::SetBreakPoints(HANDLE hProcess, Addresses&& addresses) const
63 {
64 InstructionCollection oldInstructions;
65
66 std::sort(addresses.begin(), addresses.end());
67 auto beginRange = addresses.cbegin();
68
69 for (auto it = beginRange; it < addresses.cend(); ++it)
70 {
71 if (*it - *beginRange > 4096)
72 {
73 SetBreakPointsRange(hProcess, beginRange, it, oldInstructions);
74 beginRange = it;
75 }
76 }
77 SetBreakPointsRange(
78 hProcess, beginRange, addresses.end(), oldInstructions);
79
80 return oldInstructions;
81 }
82
83 //-------------------------------------------------------------------------
84 void BreakPoint::RemoveBreakPoint(const Address& address,

Callers 2

SetBreakPointMethod · 0.80
TESTFunction · 0.80

Calls 1

SetBreakPointsRangeFunction · 0.85

Tested by 1

TESTFunction · 0.64