MCPcopy Create free account
hub / github.com/covscript/covscript / remove

Method remove

sources/debugger.cpp:212–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210 }
211
212 void remove(std::size_t id)
213 {
214 m_breakpoints.remove_if([this, id](const breakpoint &b) -> bool {
215 if (b.id == id && b.data.index() == 2)
216 std::get<cs::var>(b.data).const_val<cs::callable>().get_raw_data().target<cs::function_ptr>()->fptr->set_debugger_state(
217 false);
218 else if (b.id == id && b.data.index() == 1)
219 m_pending.erase(m_pending.find(std::get<std::string>(b.data)));
220 return b.id == id; });
221 auto it = m_pending.begin();
222 for (; it != m_pending.end(); ++it)
223 if (it->second.first == id)
224 break;
225 if (it != m_pending.end())
226 m_pending.erase(it);
227 }
228
229 bool exist(std::size_t line_num) const
230 {

Callers 2

covscript_mainFunction · 0.45
removeFunction · 0.45

Calls 5

set_debugger_stateMethod · 0.80
eraseMethod · 0.80
indexMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected