Struct ckb_vm_debug_utils::GdbStubHandler
source · pub struct GdbStubHandler<M: SupportMachine, A> { /* private fields */ }Implementations§
source§impl<R: Register, M: SupportMachine + CoreMachine<REG = R>, A: Arch<Usize = R>> GdbStubHandler<M, A>
impl<R: Register, M: SupportMachine + CoreMachine<REG = R>, A: Arch<Usize = R>> GdbStubHandler<M, A>
pub fn new(machine: DefaultMachine<M>) -> Self
source§impl<R: Register + Debug + Eq + StdHash, M: SupportMachine + CoreMachine<REG = R>, A: Arch<Usize = R>> GdbStubHandler<M, A>
impl<R: Register + Debug + Eq + StdHash, M: SupportMachine + CoreMachine<REG = R>, A: Arch<Usize = R>> GdbStubHandler<M, A>
Trait Implementations§
source§impl<R: Register + Debug + Eq + StdHash, M: SupportMachine + CoreMachine<REG = R>, A: Arch<Usize = R, Registers = RiscvCoreRegs<R>, RegId = RiscvRegId<R>>> Breakpoints for GdbStubHandler<M, A>
impl<R: Register + Debug + Eq + StdHash, M: SupportMachine + CoreMachine<REG = R>, A: Arch<Usize = R, Registers = RiscvCoreRegs<R>, RegId = RiscvRegId<R>>> Breakpoints for GdbStubHandler<M, A>
source§fn support_sw_breakpoint(&mut self) -> Option<SwBreakpointOps<'_, Self>>
fn support_sw_breakpoint(&mut self) -> Option<SwBreakpointOps<'_, Self>>
Support for setting / removing software breakpoints.
source§fn support_hw_watchpoint(&mut self) -> Option<HwWatchpointOps<'_, Self>>
fn support_hw_watchpoint(&mut self) -> Option<HwWatchpointOps<'_, Self>>
Support for setting / removing hardware watchpoints.
source§fn support_hw_breakpoint(
&mut self
) -> Option<&mut dyn HwBreakpoint<Error = Self::Error, Arch = Self::Arch>>
fn support_hw_breakpoint( &mut self ) -> Option<&mut dyn HwBreakpoint<Error = Self::Error, Arch = Self::Arch>>
Support for setting / removing hardware breakpoints.
source§impl<R: Register + Debug + Eq + StdHash, M: SupportMachine + CoreMachine<REG = R>, A: Arch<Usize = R, Registers = RiscvCoreRegs<R>, RegId = RiscvRegId<R>>> CatchSyscalls for GdbStubHandler<M, A>
impl<R: Register + Debug + Eq + StdHash, M: SupportMachine + CoreMachine<REG = R>, A: Arch<Usize = R, Registers = RiscvCoreRegs<R>, RegId = RiscvRegId<R>>> CatchSyscalls for GdbStubHandler<M, A>
source§fn enable_catch_syscalls(
&mut self,
filter: Option<SyscallNumbers<'_, <Self::Arch as Arch>::Usize>>
) -> TargetResult<(), Self>
fn enable_catch_syscalls( &mut self, filter: Option<SyscallNumbers<'_, <Self::Arch as Arch>::Usize>> ) -> TargetResult<(), Self>
Enables catching syscalls from the inferior process. Read more
source§fn disable_catch_syscalls(&mut self) -> TargetResult<(), Self>
fn disable_catch_syscalls(&mut self) -> TargetResult<(), Self>
Disables catching syscalls from the inferior process.
source§impl<R: Register, M: SupportMachine + CoreMachine<REG = R>, A> CoreMachine for GdbStubHandler<M, A>
impl<R: Register, M: SupportMachine + CoreMachine<REG = R>, A> CoreMachine for GdbStubHandler<M, A>
type REG = R
type MEM = GdbStubHandler<M, A>
fn pc(&self) -> &Self::REG
fn update_pc(&mut self, pc: Self::REG)
fn commit_pc(&mut self)
fn memory(&self) -> &Self::MEM
fn memory_mut(&mut self) -> &mut Self::MEM
fn registers(&self) -> &[Self::REG]
fn set_register(&mut self, idx: usize, value: Self::REG)
fn version(&self) -> u32
fn isa(&self) -> u8
source§impl<R: Register + Debug + Eq + StdHash, M: SupportMachine + CoreMachine<REG = R>, A: Arch<Usize = R, Registers = RiscvCoreRegs<R>, RegId = RiscvRegId<R>>> HwWatchpoint for GdbStubHandler<M, A>
impl<R: Register + Debug + Eq + StdHash, M: SupportMachine + CoreMachine<REG = R>, A: Arch<Usize = R, Registers = RiscvCoreRegs<R>, RegId = RiscvRegId<R>>> HwWatchpoint for GdbStubHandler<M, A>
source§impl<R: Register, M: SupportMachine + CoreMachine<REG = R>, A> Machine for GdbStubHandler<M, A>
impl<R: Register, M: SupportMachine + CoreMachine<REG = R>, A> Machine for GdbStubHandler<M, A>
source§impl<R: Register, M: SupportMachine + CoreMachine<REG = R>, A> Memory for GdbStubHandler<M, A>
impl<R: Register, M: SupportMachine + CoreMachine<REG = R>, A> Memory for GdbStubHandler<M, A>
type REG = R
fn new() -> Self
fn new_with_memory(_: usize) -> Self
fn memory_size(&self) -> usize
fn load_bytes(&mut self, addr: u64, size: u64) -> Result<Bytes, Error>
fn lr(&self) -> &<Self as Memory>::REG
fn set_lr(&mut self, addr: &<Self as Memory>::REG)
fn init_pages( &mut self, addr: u64, size: u64, flags: u8, source: Option<Bytes>, offset_from_addr: u64 ) -> Result<(), Error>
fn fetch_flag(&mut self, page: u64) -> Result<u8, Error>
fn set_flag(&mut self, page: u64, flag: u8) -> Result<(), Error>
fn clear_flag(&mut self, page: u64, flag: u8) -> Result<(), Error>
fn store_byte(&mut self, addr: u64, size: u64, value: u8) -> Result<(), Error>
fn store_bytes(&mut self, addr: u64, value: &[u8]) -> Result<(), Error>
fn execute_load16(&mut self, addr: u64) -> Result<u16, Error>
fn execute_load32(&mut self, addr: u64) -> Result<u32, Error>
fn load8(&mut self, addr: &Self::REG) -> Result<Self::REG, Error>
fn load16(&mut self, addr: &Self::REG) -> Result<Self::REG, Error>
fn load32(&mut self, addr: &Self::REG) -> Result<Self::REG, Error>
fn load64(&mut self, addr: &Self::REG) -> Result<Self::REG, Error>
fn store8(&mut self, addr: &Self::REG, value: &Self::REG) -> Result<(), Error>
fn store16(&mut self, addr: &Self::REG, value: &Self::REG) -> Result<(), Error>
fn store32(&mut self, addr: &Self::REG, value: &Self::REG) -> Result<(), Error>
fn store64(&mut self, addr: &Self::REG, value: &Self::REG) -> Result<(), Error>
fn memory_pages(&self) -> usize
source§impl<R: Register + Debug + Eq + StdHash, M: SupportMachine + CoreMachine<REG = R>, A: Arch<Usize = R, Registers = RiscvCoreRegs<R>, RegId = RiscvRegId<R>>> SingleRegisterAccess<()> for GdbStubHandler<M, A>
impl<R: Register + Debug + Eq + StdHash, M: SupportMachine + CoreMachine<REG = R>, A: Arch<Usize = R, Registers = RiscvCoreRegs<R>, RegId = RiscvRegId<R>>> SingleRegisterAccess<()> for GdbStubHandler<M, A>
source§impl<R: Register + Debug + Eq + StdHash, M: SupportMachine + CoreMachine<REG = R>, A: Arch<Usize = R, Registers = RiscvCoreRegs<R>, RegId = RiscvRegId<R>>> SingleThreadBase for GdbStubHandler<M, A>
impl<R: Register + Debug + Eq + StdHash, M: SupportMachine + CoreMachine<REG = R>, A: Arch<Usize = R, Registers = RiscvCoreRegs<R>, RegId = RiscvRegId<R>>> SingleThreadBase for GdbStubHandler<M, A>
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_single_register_access(
&mut self
) -> Option<SingleRegisterAccessOps<'_, (), Self>>
fn support_single_register_access( &mut self ) -> Option<SingleRegisterAccessOps<'_, (), Self>>
Support for single-register access.
See
SingleRegisterAccess for more details. Read moresource§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)source§impl<R: Register + Debug + Eq + StdHash, M: SupportMachine + CoreMachine<REG = R>, A: Arch<Usize = R, Registers = RiscvCoreRegs<R>, RegId = RiscvRegId<R>>> SingleThreadRangeStepping for GdbStubHandler<M, A>
impl<R: Register + Debug + Eq + StdHash, M: SupportMachine + CoreMachine<REG = R>, A: Arch<Usize = R, Registers = RiscvCoreRegs<R>, RegId = RiscvRegId<R>>> SingleThreadRangeStepping for GdbStubHandler<M, A>
source§impl<R: Register + Debug + Eq + StdHash, M: SupportMachine + CoreMachine<REG = R>, A: Arch<Usize = R, Registers = RiscvCoreRegs<R>, RegId = RiscvRegId<R>>> SingleThreadResume for GdbStubHandler<M, A>
impl<R: Register + Debug + Eq + StdHash, M: SupportMachine + CoreMachine<REG = R>, A: Arch<Usize = R, Registers = RiscvCoreRegs<R>, RegId = RiscvRegId<R>>> SingleThreadResume for GdbStubHandler<M, A>
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.
source§fn support_range_step(
&mut self
) -> Option<SingleThreadRangeSteppingOps<'_, Self>>
fn support_range_step( &mut self ) -> Option<SingleThreadRangeSteppingOps<'_, Self>>
Support for optimized range stepping.
source§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.
source§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.
source§impl<R: Register + Debug + Eq + StdHash, M: SupportMachine + CoreMachine<REG = R>, A: Arch<Usize = R, Registers = RiscvCoreRegs<R>, RegId = RiscvRegId<R>>> SingleThreadSingleStep for GdbStubHandler<M, A>
impl<R: Register + Debug + Eq + StdHash, M: SupportMachine + CoreMachine<REG = R>, A: Arch<Usize = R, Registers = RiscvCoreRegs<R>, RegId = RiscvRegId<R>>> SingleThreadSingleStep for GdbStubHandler<M, A>
source§impl<R: Register + Debug + Eq + StdHash, M: SupportMachine + CoreMachine<REG = R>, A: Arch<Usize = R, Registers = RiscvCoreRegs<R>, RegId = RiscvRegId<R>>> SwBreakpoint for GdbStubHandler<M, A>
impl<R: Register + Debug + Eq + StdHash, M: SupportMachine + CoreMachine<REG = R>, A: Arch<Usize = R, Registers = RiscvCoreRegs<R>, RegId = RiscvRegId<R>>> SwBreakpoint for GdbStubHandler<M, A>
source§fn add_sw_breakpoint(
&mut self,
addr: <Self::Arch as Arch>::Usize,
_kind: <Self::Arch as Arch>::BreakpointKind
) -> TargetResult<bool, Self>
fn add_sw_breakpoint( &mut self, addr: <Self::Arch as Arch>::Usize, _kind: <Self::Arch as Arch>::BreakpointKind ) -> TargetResult<bool, Self>
Add a new software breakpoint. Read more
source§fn remove_sw_breakpoint(
&mut self,
addr: <Self::Arch as Arch>::Usize,
_kind: <Self::Arch as Arch>::BreakpointKind
) -> TargetResult<bool, Self>
fn remove_sw_breakpoint( &mut self, addr: <Self::Arch as Arch>::Usize, _kind: <Self::Arch as Arch>::BreakpointKind ) -> TargetResult<bool, Self>
Remove an existing software breakpoint. Read more
source§impl<R: Register + Debug + Eq + StdHash, M: SupportMachine + CoreMachine<REG = R>, A: Arch<Usize = R, Registers = RiscvCoreRegs<R>, RegId = RiscvRegId<R>>> Target for GdbStubHandler<M, A>
impl<R: Register + Debug + Eq + StdHash, M: SupportMachine + CoreMachine<REG = R>, A: Arch<Usize = R, Registers = RiscvCoreRegs<R>, RegId = RiscvRegId<R>>> Target for GdbStubHandler<M, A>
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 support_catch_syscalls(&mut self) -> Option<CatchSyscallsOps<'_, Self>>
fn support_catch_syscalls(&mut self) -> Option<CatchSyscallsOps<'_, Self>>
Support for setting / removing syscall catchpoints.
source§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 moresource§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 moresource§fn use_no_ack_mode(&self) -> bool
fn use_no_ack_mode(&self) -> bool
Enable/disable support for activating “no ack mode”. Read more
source§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 moresource§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 moresource§fn use_rle(&self) -> bool
fn use_rle(&self) -> bool
Enable/Disable the use of run-length encoding on outgoing packets. Read more
source§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
source§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
source§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.source§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.
source§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.
source§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.source§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.source§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.
source§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.
Auto Trait Implementations§
impl<M, A> Freeze for GdbStubHandler<M, A>
impl<M, A> !RefUnwindSafe for GdbStubHandler<M, A>
impl<M, A> Send for GdbStubHandler<M, A>
impl<M, A> Sync for GdbStubHandler<M, A>
impl<M, A> Unpin for GdbStubHandler<M, A>
impl<M, A> !UnwindSafe for GdbStubHandler<M, A>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more