MCPcopy Create free account
hub / github.com/Vector35/debugger / RemoveBreakpoint

Method RemoveBreakpoint

core/adapters/lldbadapter.cpp:615–639  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

613
614
615bool 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
642bool LldbAdapter::RemoveBreakpoint(const ModuleNameAndOffset& breakpoint)

Callers 3

RemoveAbsoluteMethod · 0.45
RemoveOffsetMethod · 0.45
RunToAndWaitInternalMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected