pub struct Breakpoints { /* private fields */ }Expand description
The shared table of entry-point breakpoints.
Implementations§
Source§impl Breakpoints
impl Breakpoints
Sourcepub fn sync(
&mut self,
s: &CpuState,
mem: &dyn GuestMemory,
msrs: &EntryMsrs,
) -> usize
pub fn sync( &mut self, s: &CpuState, mem: &dyn GuestMemory, msrs: &EntryMsrs, ) -> usize
Scans the IDT this vCPU uses, plus the system-call MSRs, and plants a breakpoint on every entry point that does not have one yet.
Breakpoints are only ever added here; Breakpoints::clear
removes them all when tracing stops.
Sourcepub fn original(&self, phys: u64) -> Option<u8>
pub fn original(&self, phys: u64) -> Option<u8>
The byte the guest wrote at phys, if a breakpoint covers it.
Sourcepub fn lift(&mut self, phys: u64, vcpu: u32, mem: &dyn GuestMemory) -> bool
pub fn lift(&mut self, phys: u64, vcpu: u32, mem: &dyn GuestMemory) -> bool
Temporarily restores the original byte so vcpu can execute it.
Sourcepub fn reinsert(&mut self, phys: u64, mem: &dyn GuestMemory)
pub fn reinsert(&mut self, phys: u64, mem: &dyn GuestMemory)
Puts a lifted breakpoint back.
Sourcepub fn on_guest_write(&mut self, phys: u64, size: u32, mem: &dyn GuestMemory)
pub fn on_guest_write(&mut self, phys: u64, size: u32, mem: &dyn GuestMemory)
Called for every guest write the tracer observes. If the write lands on a breakpoint, the new byte becomes the “original” and the breakpoint is re-planted; if it lands on an IDT, the table is marked stale.
Sourcepub fn vectors_at(&self, la: u64) -> &[u8] ⓘ
pub fn vectors_at(&self, la: u64) -> &[u8] ⓘ
Vectors whose handler starts at linear address la.
Sourcepub fn is_syscall_entry(&self, la: u64) -> bool
pub fn is_syscall_entry(&self, la: u64) -> bool
Is la a SYSCALL/SYSENTER entry point?
Sourcepub fn clear(&mut self, mem: &dyn GuestMemory)
pub fn clear(&mut self, mem: &dyn GuestMemory)
Removes every breakpoint, restoring the guest’s bytes.