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
sourceimpl GdbStub
impl GdbStub
pub fn new(
vm_tube: Tube,
vcpu_com: Vec<Sender<VcpuControl>>,
from_vcpu: Receiver<VcpuDebugStatusMessage>
) -> Self
fn vcpu_request(&self, request: VcpuControl) -> Result<VcpuDebugStatus, Error>
fn vm_request(&self, request: VmRequest) -> Result<(), Error>
fn max_hw_breakpoints_request(&self) -> TargetResult<usize, Self>
Trait Implementations
sourceimpl Breakpoints for GdbStub
impl Breakpoints for GdbStub
sourcefn support_hw_breakpoint(&mut self) -> Option<HwBreakpointOps<'_, Self>>
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<Error = Self::Error, Arch = Self::Arch>>
fn support_sw_breakpoint(
&mut self
) -> Option<&mut dyn SwBreakpoint<Error = Self::Error, Arch = Self::Arch>>
Support for setting / removing software breakpoints.
fn support_hw_watchpoint(
&mut self
) -> Option<&mut dyn HwWatchpoint<Error = Self::Error, Arch = Self::Arch>>
fn support_hw_watchpoint(
&mut self
) -> Option<&mut dyn HwWatchpoint<Error = Self::Error, Arch = Self::Arch>>
Support for setting / removing hardware watchpoints.
sourceimpl HwBreakpoint for GdbStub
impl HwBreakpoint for GdbStub
sourcefn add_hw_breakpoint(
&mut self,
addr: <Self::Arch as Arch>::Usize,
_kind: <Self::Arch as Arch>::BreakpointKind
) -> TargetResult<bool, Self>
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.
sourcefn remove_hw_breakpoint(
&mut self,
addr: <Self::Arch as Arch>::Usize,
_kind: <Self::Arch as Arch>::BreakpointKind
) -> TargetResult<bool, Self>
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.
sourceimpl SingleRegisterAccess<()> for GdbStub
impl SingleRegisterAccess<()> for GdbStub
sourceimpl SingleThreadBase for GdbStub
impl SingleThreadBase for GdbStub
sourcefn read_registers(
&mut self,
regs: &mut <Self::Arch as Arch>::Registers
) -> TargetResult<(), Self>
fn read_registers(
&mut self,
regs: &mut <Self::Arch as Arch>::Registers
) -> TargetResult<(), Self>
Read the target’s registers.
sourcefn write_registers(
&mut self,
regs: &<Self::Arch as Arch>::Registers
) -> TargetResult<(), Self>
fn write_registers(
&mut self,
regs: &<Self::Arch as Arch>::Registers
) -> TargetResult<(), Self>
Write the target’s registers.
sourcefn read_addrs(
&mut self,
start_addr: <Self::Arch as Arch>::Usize,
data: &mut [u8]
) -> TargetResult<(), Self>
fn read_addrs(
&mut self,
start_addr: <Self::Arch as Arch>::Usize,
data: &mut [u8]
) -> TargetResult<(), Self>
Read bytes from the specified address range. Read more
sourcefn write_addrs(
&mut self,
start_addr: <Self::Arch as Arch>::Usize,
data: &[u8]
) -> TargetResult<(), Self>
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
sourcefn support_resume(&mut self) -> Option<SingleThreadResumeOps<'_, Self>>
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<(), Error = Self::Error, Arch = Self::Arch>>
fn support_single_register_access(
&mut self
) -> Option<&mut dyn SingleRegisterAccess<(), Error = Self::Error, Arch = Self::Arch>>
Support for single-register access.
See SingleRegisterAccess
for more details. Read more
sourceimpl SingleThreadResume for GdbStub
impl SingleThreadResume for GdbStub
sourcefn resume(&mut self, _signal: Option<Signal>) -> Result<(), Self::Error>
fn resume(&mut self, _signal: Option<Signal>) -> Result<(), Self::Error>
Resume execution on the target. Read more
sourcefn support_single_step(&mut self) -> Option<SingleThreadSingleStepOps<'_, Self>>
fn support_single_step(&mut self) -> Option<SingleThreadSingleStepOps<'_, Self>>
Support for optimized single stepping. Read more
fn support_range_step(
&mut self
) -> Option<&mut dyn SingleThreadRangeStepping<Error = Self::Error, Arch = Self::Arch>>
fn support_range_step(
&mut self
) -> Option<&mut dyn SingleThreadRangeStepping<Error = Self::Error, Arch = Self::Arch>>
Support for optimized range stepping. Read more
fn support_reverse_step(
&mut self
) -> Option<&mut dyn ReverseStep<(), Error = Self::Error, Arch = Self::Arch>>
fn support_reverse_step(
&mut self
) -> Option<&mut dyn ReverseStep<(), Error = Self::Error, Arch = Self::Arch>>
Support for reverse stepping a target. Read more
fn support_reverse_cont(
&mut self
) -> Option<&mut dyn ReverseCont<(), Error = Self::Error, Arch = Self::Arch>>
fn support_reverse_cont(
&mut self
) -> Option<&mut dyn ReverseCont<(), Error = Self::Error, Arch = Self::Arch>>
Support for reverse continuing a target. Read more
sourceimpl Target for GdbStub
impl Target for GdbStub
type Arch = X86_64_SSE
type Arch = X86_64_SSE
The target’s architecture.
sourcefn base_ops(&mut self) -> BaseOps<'_, Self::Arch, Self::Error>
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
sourcefn support_breakpoints(&mut self) -> Option<BreakpointsOps<'_, Self>>
fn support_breakpoints(&mut self) -> Option<BreakpointsOps<'_, Self>>
Support for setting / removing breakpoints.
sourcefn guard_rail_implicit_sw_breakpoints(&self) -> bool
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 guard_rail_single_step_gdb_behavior(&self) -> SingleStepGdbBehavior
fn guard_rail_single_step_gdb_behavior(&self) -> SingleStepGdbBehavior
Override the arch-level value for [Arch::single_step_gdb_behavior
]. Read more
fn use_x_upcase_packet(&self) -> bool
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
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
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
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
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<Error = Self::Error, Arch = Self::Arch>>
fn support_monitor_cmd(
&mut self
) -> Option<&mut dyn MonitorCmd<Error = Self::Error, Arch = Self::Arch>>
Support for handling custom GDB monitor
commands.
fn support_extended_mode(
&mut self
) -> Option<&mut dyn ExtendedMode<Error = Self::Error, Arch = Self::Arch>>
fn support_extended_mode(
&mut self
) -> Option<&mut dyn ExtendedMode<Error = Self::Error, Arch = Self::Arch>>
Support for Extended Mode operations.
fn support_section_offsets(
&mut self
) -> Option<&mut dyn SectionOffsets<Error = Self::Error, Arch = Self::Arch>>
fn support_section_offsets(
&mut self
) -> Option<&mut dyn SectionOffsets<Error = Self::Error, Arch = Self::Arch>>
Support for handling requests to get the target’s current section (or segment) offsets. Read more
fn support_target_description_xml_override(
&mut self
) -> Option<&mut dyn TargetDescriptionXmlOverride<Error = Self::Error, Arch = Self::Arch>>
fn support_target_description_xml_override(
&mut self
) -> Option<&mut dyn TargetDescriptionXmlOverride<Error = Self::Error, Arch = Self::Arch>>
Support for overriding the target description XML specified by
Target::Arch
. Read more
fn support_lldb_register_info_override(
&mut self
) -> Option<&mut dyn LldbRegisterInfoOverride<Error = Self::Error, Arch = Self::Arch>>
fn support_lldb_register_info_override(
&mut self
) -> Option<&mut dyn LldbRegisterInfoOverride<Error = Self::Error, Arch = Self::Arch>>
(LLDB extension) Support for overriding the register info specified by
Target::Arch
. Read more
fn support_memory_map(
&mut self
) -> Option<&mut dyn MemoryMap<Error = Self::Error, Arch = Self::Arch>>
fn support_memory_map(
&mut self
) -> Option<&mut dyn MemoryMap<Error = Self::Error, Arch = Self::Arch>>
Support for reading the target’s memory map.
fn support_catch_syscalls(
&mut self
) -> Option<&mut dyn CatchSyscalls<Error = Self::Error, Arch = Self::Arch>>
fn support_catch_syscalls(
&mut self
) -> Option<&mut dyn CatchSyscalls<Error = Self::Error, Arch = Self::Arch>>
Support for setting / removing syscall catchpoints.
fn support_host_io(
&mut self
) -> Option<&mut dyn HostIo<Error = Self::Error, Arch = Self::Arch>>
fn support_host_io(
&mut self
) -> Option<&mut dyn HostIo<Error = Self::Error, Arch = Self::Arch>>
Support for Host I/O operations.
fn support_exec_file(
&mut self
) -> Option<&mut dyn ExecFile<Error = Self::Error, Arch = Self::Arch>>
fn support_exec_file(
&mut self
) -> Option<&mut dyn ExecFile<Error = Self::Error, Arch = Self::Arch>>
Support for reading the current exec-file.
fn support_auxv(
&mut self
) -> Option<&mut dyn Auxv<Error = Self::Error, Arch = Self::Arch>>
fn support_auxv(
&mut self
) -> Option<&mut dyn Auxv<Error = Self::Error, Arch = Self::Arch>>
Support for reading the target’s Auxillary Vector.
Auto Trait Implementations
impl !RefUnwindSafe for GdbStub
impl Send for GdbStub
impl !Sync for GdbStub
impl Unpin for GdbStub
impl !UnwindSafe for GdbStub
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, 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
. Read more
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
fn as_any(&self) -> &(dyn Any + 'static)
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. Read more
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
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. Read more