Struct GdbStubHandler

Source
pub struct GdbStubHandler<DL>{
    pub machine: MachineAssign<DL>,
    /* private fields */
}

Fields§

§machine: MachineAssign<DL>

Implementations§

Source§

impl<DL> GdbStubHandler<DL>

Source

pub fn new(machine: MachineAssign<DL>) -> Self

Source§

impl<DL> GdbStubHandler<DL>

Source

pub fn run_till_exited(self) -> Result<(i8, u64), Error>

Trait Implementations§

Source§

impl<DL> Breakpoints for GdbStubHandler<DL>

Source§

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>>

Support for setting / removing hardware watchpoints.
Source§

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

Support for setting / removing hardware breakpoints.
Source§

impl<DL> CatchSyscalls for GdbStubHandler<DL>

Source§

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>

Disables catching syscalls from the inferior process.
Source§

impl<DL> CoreMachine for GdbStubHandler<DL>

Source§

type REG = u64

Source§

type MEM = GdbStubHandler<DL>

Source§

fn pc(&self) -> &Self::REG

Source§

fn update_pc(&mut self, pc: Self::REG)

Source§

fn commit_pc(&mut self)

Source§

fn memory(&self) -> &Self::MEM

Source§

fn memory_mut(&mut self) -> &mut Self::MEM

Source§

fn registers(&self) -> &[Self::REG]

Source§

fn set_register(&mut self, idx: usize, value: Self::REG)

Source§

fn version(&self) -> u32

Source§

fn isa(&self) -> u8

Source§

impl<DL> HwWatchpoint for GdbStubHandler<DL>

Source§

fn add_hw_watchpoint( &mut self, addr: <Self::Arch as Arch>::Usize, _len: <Self::Arch as Arch>::Usize, kind: WatchKind, ) -> TargetResult<bool, Self>

Add a new hardware watchpoint. The number of bytes to watch is specified by len. Read more
Source§

fn remove_hw_watchpoint( &mut self, addr: <Self::Arch as Arch>::Usize, _len: <Self::Arch as Arch>::Usize, kind: WatchKind, ) -> TargetResult<bool, Self>

Remove an existing hardware watchpoint. The number of bytes to watch is specified by len. Read more
Source§

impl<DL> Machine for GdbStubHandler<DL>

Source§

fn ecall(&mut self) -> Result<(), Error>

Source§

fn ebreak(&mut self) -> Result<(), Error>

Source§

impl<DL> Memory for GdbStubHandler<DL>

Source§

type REG = u64

Source§

fn new() -> Self

Source§

fn new_with_memory(_: usize) -> Self

Source§

fn memory_size(&self) -> usize

Source§

fn load_bytes(&mut self, addr: u64, size: u64) -> Result<Bytes, Error>

Source§

fn lr(&self) -> &<Self as Memory>::REG

Source§

fn set_lr(&mut self, addr: &<Self as Memory>::REG)

Source§

fn init_pages( &mut self, addr: u64, size: u64, flags: u8, source: Option<Bytes>, offset_from_addr: u64, ) -> Result<(), Error>

Source§

fn fetch_flag(&mut self, page: u64) -> Result<u8, Error>

Source§

fn set_flag(&mut self, page: u64, flag: u8) -> Result<(), Error>

Source§

fn clear_flag(&mut self, page: u64, flag: u8) -> Result<(), Error>

Source§

fn store_byte(&mut self, addr: u64, size: u64, value: u8) -> Result<(), Error>

Source§

fn store_bytes(&mut self, addr: u64, value: &[u8]) -> Result<(), Error>

Source§

fn execute_load16(&mut self, addr: u64) -> Result<u16, Error>

Source§

fn execute_load32(&mut self, addr: u64) -> Result<u32, Error>

Source§

fn load8(&mut self, addr: &Self::REG) -> Result<Self::REG, Error>

Source§

fn load16(&mut self, addr: &Self::REG) -> Result<Self::REG, Error>

Source§

fn load32(&mut self, addr: &Self::REG) -> Result<Self::REG, Error>

Source§

fn load64(&mut self, addr: &Self::REG) -> Result<Self::REG, Error>

Source§

fn store8(&mut self, addr: &Self::REG, value: &Self::REG) -> Result<(), Error>

Source§

fn store16(&mut self, addr: &Self::REG, value: &Self::REG) -> Result<(), Error>

Source§

fn store32(&mut self, addr: &Self::REG, value: &Self::REG) -> Result<(), Error>

Source§

fn store64(&mut self, addr: &Self::REG, value: &Self::REG) -> Result<(), Error>

Source§

fn memory_pages(&self) -> usize

Source§

impl<DL> SingleRegisterAccess<()> for GdbStubHandler<DL>

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<DL> SingleThreadBase for GdbStubHandler<DL>

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_single_register_access( &mut self, ) -> Option<SingleRegisterAccessOps<'_, (), Self>>

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

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

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

impl<DL> SingleThreadRangeStepping for GdbStubHandler<DL>

Source§

fn resume_range_step(&mut self, start: u64, end: u64) -> Result<(), Self::Error>

Range step the target. Read more
Source§

impl<DL> SingleThreadResume for GdbStubHandler<DL>

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.
Source§

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>>

Support for reverse stepping a target.
Source§

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

Support for reverse continuing a target.
Source§

impl<DL> SingleThreadSingleStep for GdbStubHandler<DL>

Source§

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

Source§

impl<DL> SwBreakpoint for GdbStubHandler<DL>

Source§

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>

Remove an existing software breakpoint. Read more
Source§

impl<DL> Target for GdbStubHandler<DL>

Source§

type Arch = Riscv64

The target’s architecture.
Source§

type Error = Error

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 support_catch_syscalls(&mut self) -> Option<CatchSyscallsOps<'_, Self>>

Support for setting / removing syscall catchpoints.
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
Source§

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

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

fn use_resume_stub(&self) -> bool

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

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

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

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>>

Support for handling custom GDB monitor commands.
Source§

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>>

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

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

Support for setting / removing tracepoints.
Source§

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>>

(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>>

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>>

Support for Host I/O operations.
Source§

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

Support for reading the current exec-file.
Source§

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

Support for reading the target’s Auxillary Vector.
Source§

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

Support for reading a list of libraries for SVR4 (System-V/Unix) platforms.

Auto Trait Implementations§

§

impl<DL> Freeze for GdbStubHandler<DL>

§

impl<DL> !RefUnwindSafe for GdbStubHandler<DL>

§

impl<DL> Send for GdbStubHandler<DL>

§

impl<DL> Sync for GdbStubHandler<DL>

§

impl<DL> Unpin for GdbStubHandler<DL>

§

impl<DL> !UnwindSafe for GdbStubHandler<DL>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AsAny for T
where T: Any,

Source§

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

Cast to trait Any
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

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 T
where U: TryFrom<T>,

Source§

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.
Source§

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

Source§

fn vzip(self) -> V