| 613 | |
| 614 | |
| 615 | bool LldbAdapter::RemoveBreakpoint(const DebugBreakpoint& breakpoint) |
| 616 | { |
| 617 | // This is what gets called when we delete a breakpoint from the controller. Because the adapter would have no |
| 618 | // convenient way of mapping a ModuleNameAndOffset to an actual address, so the controller uses the address of the |
| 619 | // breakpoint to carry out deletion. |
| 620 | |
| 621 | // Only the address is valid. We cannot use the .m_id info. |
| 622 | bool ok = false; |
| 623 | uint64_t address = breakpoint.m_address; |
| 624 | for (size_t i = 0; i < m_target.GetNumBreakpoints(); i++) |
| 625 | { |
| 626 | auto bp = m_target.GetBreakpointAtIndex(i); |
| 627 | for (size_t j = 0; j < bp.GetNumLocations(); j++) |
| 628 | { |
| 629 | auto location = bp.GetLocationAtIndex(j); |
| 630 | auto bpAddress = location.GetAddress().GetLoadAddress(m_target); |
| 631 | if (address == bpAddress) |
| 632 | { |
| 633 | ok |= m_target.BreakpointDelete(bp.GetID()); |
| 634 | break; |
| 635 | } |
| 636 | } |
| 637 | } |
| 638 | return ok; |
| 639 | } |
| 640 | |
| 641 | |
| 642 | bool LldbAdapter::RemoveBreakpoint(const ModuleNameAndOffset& breakpoint) |
no outgoing calls
no test coverage detected