MCPcopy Create free account
hub / github.com/Kitware/CMake / GetBreakpoints

Method GetBreakpoints

Source/cmDebuggerBreakpointManager.cxx:171–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169}
170
171std::vector<int64_t> cmDebuggerBreakpointManager::GetBreakpoints(
172 std::string const& sourcePath, int64_t line)
173{
174 std::unique_lock<std::mutex> lock(Mutex);
175 auto const& all = Breakpoints[sourcePath];
176 std::vector<int64_t> breakpoints;
177 if (all.empty()) {
178 return breakpoints;
179 }
180
181 auto it = all.begin();
182
183 while ((it = std::find_if(
184 it, all.end(), [&](cmDebuggerSourceBreakpoint const& breakpoint) {
185 return (breakpoint.GetIsValid() && breakpoint.GetLine() == line);
186 })) != all.end()) {
187 breakpoints.emplace_back(it->GetId());
188 ++it;
189 }
190
191 return breakpoints;
192}
193
194size_t cmDebuggerBreakpointManager::GetBreakpointCount() const
195{

Callers 1

OnBeginFunctionCallMethod · 0.80

Calls 7

GetIsValidMethod · 0.80
emplace_backMethod · 0.80
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
GetLineMethod · 0.45
GetIdMethod · 0.45

Tested by

no test coverage detected