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
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§
source§impl Breakpoints for GdbStub
impl Breakpoints for GdbStub
source§fn 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<Arch = Self::Arch, Error = Self::Error>>
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>>
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
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>
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>
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
impl SingleRegisterAccess<()> for GdbStub
source§impl SingleThreadBase for GdbStub
impl SingleThreadBase for GdbStub
source§fn 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.
source§fn 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.
source§fn 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
source§fn 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
source§fn 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<(), Arch = Self::Arch, Error = Self::Error>>
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 moresource§impl SingleThreadResume for GdbStub
impl SingleThreadResume for GdbStub
source§fn 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
source§fn support_single_step(&mut self) -> Option<SingleThreadSingleStepOps<'_, Self>>
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>>
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>>
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>>
fn support_reverse_cont(
&mut self
) -> Option<&mut dyn ReverseCont<(), Arch = Self::Arch, Error = Self::Error>>
Support for reverse continuing a target.
source§impl Target for GdbStub
impl Target for GdbStub
source§fn 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
source§fn support_breakpoints(&mut self) -> Option<BreakpointsOps<'_, Self>>
fn support_breakpoints(&mut self) -> Option<BreakpointsOps<'_, Self>>
Support for setting / removing breakpoints.
source§fn 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<Arch = Self::Arch, Error = Self::Error>>
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>>
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>>
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>>
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>>
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>>
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>>
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>>
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>>
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>>
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§
impl RefUnwindSafe for GdbStub
impl Send for GdbStub
impl !Sync for GdbStub
impl Unpin for GdbStub
impl UnwindSafe for GdbStub
Blanket Implementations§
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
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
.§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
.§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.§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.