| 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 | { |
no test coverage detected