MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / remove_hw_breakpoint

Method remove_hw_breakpoint

vmm/src/gdb.rs:423–441  ·  view source on GitHub ↗
(
        &mut self,
        addr: <Self::Arch as Arch>::Usize,
        _kind: <Self::Arch as Arch>::BreakpointKind,
    )

Source from the content-addressed store, hash-verified

421 }
422 }
423 fn remove_hw_breakpoint(
424 &mut self,
425 addr: <Self::Arch as Arch>::Usize,
426 _kind: <Self::Arch as Arch>::BreakpointKind,
427 ) -> TargetResult<bool, Self> {
428 match self.hw_breakpoints.iter().position(|&b| b.0 == addr) {
429 None => return Ok(false),
430 Some(pos) => self.hw_breakpoints.remove(pos),
431 };
432
433 let payload = GdbRequestPayload::SetHwBreakPoint(self.hw_breakpoints.clone());
434 match self.vm_request(payload, 0) {
435 Ok(_) => Ok(true),
436 Err(e) => {
437 error!("Failed to request SetHwBreakPoint: {e:?}");
438 Err(TargetError::NonFatal)
439 }
440 }
441 }
442}
443
444enum GdbEventLoop {}

Callers

nothing calls this directly

Calls 4

iterMethod · 0.80
vm_requestMethod · 0.80
removeMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected