Struct crosvm::crosvm::gdb::GdbStub

source ·
pub struct GdbStub {
    vm_tube: Mutex<Tube>,
    vcpu_com: Vec<Sender<VcpuControl>>,
    from_vcpu: Receiver<VcpuDebugStatusMessage>,
    single_step: bool,
    max_hw_breakpoints: Option<usize>,
    hw_breakpoints: Vec<GuestAddress>,
}

Fields§

§vm_tube: Mutex<Tube>§vcpu_com: Vec<Sender<VcpuControl>>§from_vcpu: Receiver<VcpuDebugStatusMessage>§single_step: bool§max_hw_breakpoints: Option<usize>§hw_breakpoints: Vec<GuestAddress>

Implementations§

source§

impl GdbStub

source

pub fn new( vm_tube: Tube, vcpu_com: Vec<Sender<VcpuControl>>, from_vcpu: Receiver<VcpuDebugStatusMessage> ) -> Self

source

fn vcpu_request(&self, request: VcpuControl) -> Result<VcpuDebugStatus, Error>

source

fn vm_request(&self, request: VmRequest) -> Result<(), Error>

source

fn max_hw_breakpoints_request(&self) -> TargetResult<usize, Self>

Trait Implementations§

source§

impl Breakpoints for GdbStub

source§

fn support_hw_breakpoint(&mut self) -> Option<HwBreakpointOps<'_, Self>>

Support for setting / removing hardware breakpoints.
§

fn support_sw_breakpoint( &mut self ) -> Option<&mut dyn SwBreakpoint<Arch = Self::Arch, Error = Self::Error>>

Support for setting / removing software breakpoints.
§

fn support_hw_watchpoint( &mut self ) -> Option<&mut dyn HwWatchpoint<Arch = Self::Arch, Error = Self::Error>>

Support for setting / removing hardware watchpoints.
source§

impl HwBreakpoint for GdbStub

source§

fn add_hw_breakpoint( &mut self, addr: <Self::Arch as Arch>::Usize, _kind: <Self::Arch as Arch>::BreakpointKind ) -> TargetResult<bool, Self>

Add a new hardware breakpoint. Return Ok(false) if the operation could not be completed.

source§

fn remove_hw_breakpoint( &mut self, addr: <Self::Arch as Arch>::Usize, _kind: <Self::Arch as Arch>::BreakpointKind ) -> TargetResult<bool, Self>

Remove an existing hardware breakpoint. Return Ok(false) if the operation could not be completed.

source§

impl SingleRegisterAccess<()> for GdbStub

source§

fn read_register( &mut self, _tid: (), reg_id: <Self::Arch as Arch>::RegId, buf: &mut [u8] ) -> TargetResult<usize, Self>

Read to a single register on the target. Read more
source§

fn write_register( &mut self, _tid: (), reg_id: <Self::Arch as Arch>::RegId, val: &[u8] ) -> TargetResult<(), Self>

Write from a single register on the target. Read more
source§

impl SingleThreadBase for GdbStub

source§

fn read_registers( &mut self, regs: &mut <Self::Arch as Arch>::Registers ) -> TargetResult<(), Self>

Read the target’s registers.
source§

fn write_registers( &mut self, regs: &<Self::Arch as Arch>::Registers ) -> TargetResult<(), Self>

Write the target’s registers.
source§

fn read_addrs( &mut self, start_addr: <Self::Arch as Arch>::Usize, data: &mut [u8] ) -> TargetResult<usize, Self>

Read bytes from the specified address range and return the number of bytes that were read. Read more
source§

fn write_addrs( &mut self, start_addr: <Self::Arch as Arch>::Usize, data: &[u8] ) -> TargetResult<(), Self>

Write bytes to the specified address range. Read more
source§

fn support_resume(&mut self) -> Option<SingleThreadResumeOps<'_, Self>>

Support for resuming the target (e.g: via continue or step)
§

fn support_single_register_access( &mut self ) -> Option<&mut dyn SingleRegisterAccess<(), Arch = Self::Arch, Error = Self::Error>>

Support for single-register access. See SingleRegisterAccess for more details. Read more
source§

impl SingleThreadResume for GdbStub

source§

fn resume(&mut self, _signal: Option<Signal>) -> Result<(), Self::Error>

Resume execution on the target. Read more
source§

fn support_single_step(&mut self) -> Option<SingleThreadSingleStepOps<'_, Self>>

Support for optimized single stepping.
§

fn support_range_step( &mut self ) -> Option<&mut dyn SingleThreadRangeStepping<Arch = Self::Arch, Error = Self::Error>>

Support for optimized range stepping.
§

fn support_reverse_step( &mut self ) -> Option<&mut dyn ReverseStep<(), Arch = Self::Arch, Error = Self::Error>>

Support for reverse stepping a target.
§

fn support_reverse_cont( &mut self ) -> Option<&mut dyn ReverseCont<(), Arch = Self::Arch, Error = Self::Error>>

Support for reverse continuing a target.
source§

impl SingleThreadSingleStep for GdbStub

source§

fn step(&mut self, _signal: Option<Signal>) -> Result<(), Self::Error>

source§

impl Target for GdbStub

§

type Arch = X86_64_SSE

The target’s architecture.
§

type Error = &'static str

A target-specific fatal error.
source§

fn base_ops(&mut self) -> BaseOps<'_, Self::Arch, Self::Error>

Base operations such as reading/writing from memory/registers, stopping/resuming the target, etc…. Read more
source§

fn support_breakpoints(&mut self) -> Option<BreakpointsOps<'_, Self>>

Support for setting / removing breakpoints.
source§

fn guard_rail_implicit_sw_breakpoints(&self) -> bool

If the target supports resumption, but hasn’t implemented explicit support for software breakpoints (via SwBreakpoints), notify the user that the GDB client may set “implicit” software breakpoints by rewriting the target’s instruction stream. Read more
§

fn use_no_ack_mode(&self) -> bool

Enable/disable support for activating “no ack mode”. Read more
§

fn use_x_upcase_packet(&self) -> bool

Enable/disable using the more efficient X packet to write to target memory (as opposed to the basic M packet). Read more
§

fn use_resume_stub(&self) -> bool

Whether gdbstub should provide a “stub” resume implementation on targets without support for resumption. Read more
§

fn use_rle(&self) -> bool

Enable/Disable the use of run-length encoding on outgoing packets. Read more
§

fn use_target_description_xml(&self) -> bool

Whether to send a target description XML to the client. Read more
§

fn use_lldb_register_info(&self) -> bool

(LLDB extension) Whether to send register information to the client. Read more
§

fn support_monitor_cmd( &mut self ) -> Option<&mut dyn MonitorCmd<Arch = Self::Arch, Error = Self::Error>>

Support for handling custom GDB monitor commands.
§

fn support_extended_mode( &mut self ) -> Option<&mut dyn ExtendedMode<Arch = Self::Arch, Error = Self::Error>>

Support for Extended Mode operations.
§

fn support_section_offsets( &mut self ) -> Option<&mut dyn SectionOffsets<Arch = Self::Arch, Error = Self::Error>>

Support for handling requests to get the target’s current section (or segment) offsets.
§

fn support_target_description_xml_override( &mut self ) -> Option<&mut dyn TargetDescriptionXmlOverride<Arch = Self::Arch, Error = Self::Error>>

Support for overriding the target description XML specified by Target::Arch.
§

fn support_lldb_register_info_override( &mut self ) -> Option<&mut dyn LldbRegisterInfoOverride<Arch = Self::Arch, Error = Self::Error>>

(LLDB extension) Support for overriding the register info specified by Target::Arch.
§

fn support_memory_map( &mut self ) -> Option<&mut dyn MemoryMap<Arch = Self::Arch, Error = Self::Error>>

Support for reading the target’s memory map.
§

fn support_catch_syscalls( &mut self ) -> Option<&mut dyn CatchSyscalls<Arch = Self::Arch, Error = Self::Error>>

Support for setting / removing syscall catchpoints.
§

fn support_host_io( &mut self ) -> Option<&mut dyn HostIo<Arch = Self::Arch, Error = Self::Error>>

Support for Host I/O operations.
§

fn support_exec_file( &mut self ) -> Option<&mut dyn ExecFile<Arch = Self::Arch, Error = Self::Error>>

Support for reading the current exec-file.
§

fn support_auxv( &mut self ) -> Option<&mut dyn Auxv<Arch = Self::Arch, Error = Self::Error>>

Support for reading the target’s Auxillary Vector.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Downcast for Twhere T: Any,

§

fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V