Enum gdbstub::stub::BaseStopReason
source · [−]#[non_exhaustive]
pub enum BaseStopReason<Tid, U> {
DoneStep,
Exited(u8),
Terminated(Signal),
Signal(Signal),
SignalWithThread {
tid: Tid,
signal: Signal,
},
SwBreak(Tid),
HwBreak(Tid),
Watch {
tid: Tid,
kind: WatchKind,
addr: U,
},
ReplayLog {
tid: Option<Tid>,
pos: ReplayLogPosition,
},
CatchSyscall {
tid: Option<Tid>,
number: U,
position: CatchSyscallPosition,
},
}Expand description
Describes why a thread stopped.
Single threaded targets should set Tid to (), whereas multi threaded
targets should set Tid to Tid. To make things easier, it is
recommended to use the SingleThreadStopReason and
MultiThreadStopReason when possible.
Targets MUST only respond with stop reasons that correspond to IDETs that target has implemented. Not doing so will result in a runtime error.
e.g: A target which has not implemented the HwBreakpoint IDET must not
return a HwBreak stop reason. While this is not enforced at compile time,
doing so will result in a runtime UnsupportedStopReason error.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
DoneStep
Completed the single-step request.
Exited(u8)
The process exited with the specified exit status.
Terminated(Signal)
The process terminated with the specified signal number.
Signal(Signal)
The program received a signal.
SignalWithThread
A specific thread received a signal.
SwBreak(Tid)
A thread hit a software breakpoint (e.g. due to a trap instruction).
Requires: SwBreakpoint.
NOTE: This does not necessarily have to be a breakpoint configured by the client/user of the current GDB session.
HwBreak(Tid)
A thread hit a hardware breakpoint.
Requires: HwBreakpoint.
Watch
Fields
kind: WatchKindKind of watchpoint that was hit
A thread hit a watchpoint.
Requires: HwWatchpoint.
ReplayLog
Fields
tid: Option<Tid>(optional) Tid of the associated thread.
pos: ReplayLogPositionThe point reached in a replay log (i.e: beginning vs. end).
The program has reached the end of the logged replay events.
Requires: ReverseCont or ReverseStep.
This is used for GDB’s reverse execution. When playing back a recording, you may hit the end of the buffer of recorded events, and as such no further execution can be done. This stop reason tells GDB that this has occurred.
CatchSyscall
Fields
tid: Option<Tid>(optional) Tid of the associated thread.
position: CatchSyscallPositionThe location the event occurred at.
The program has reached a syscall entry or return location.
Requires: CatchSyscalls.
Trait Implementations
sourceimpl<Tid: Clone, U: Clone> Clone for BaseStopReason<Tid, U>
impl<Tid: Clone, U: Clone> Clone for BaseStopReason<Tid, U>
sourcefn clone(&self) -> BaseStopReason<Tid, U>
fn clone(&self) -> BaseStopReason<Tid, U>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl<Tid: Debug, U: Debug> Debug for BaseStopReason<Tid, U>
impl<Tid: Debug, U: Debug> Debug for BaseStopReason<Tid, U>
sourceimpl<U> From<BaseStopReason<(), U>> for BaseStopReason<Tid, U>
impl<U> From<BaseStopReason<(), U>> for BaseStopReason<Tid, U>
sourcefn from(st_stop_reason: BaseStopReason<(), U>) -> BaseStopReason<Tid, U>
fn from(st_stop_reason: BaseStopReason<(), U>) -> BaseStopReason<Tid, U>
Converts to this type from the input type.
sourceimpl<Tid: PartialEq, U: PartialEq> PartialEq<BaseStopReason<Tid, U>> for BaseStopReason<Tid, U>
impl<Tid: PartialEq, U: PartialEq> PartialEq<BaseStopReason<Tid, U>> for BaseStopReason<Tid, U>
sourcefn eq(&self, other: &BaseStopReason<Tid, U>) -> bool
fn eq(&self, other: &BaseStopReason<Tid, U>) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &BaseStopReason<Tid, U>) -> bool
fn ne(&self, other: &BaseStopReason<Tid, U>) -> bool
This method tests for !=.
impl<Tid: Copy, U: Copy> Copy for BaseStopReason<Tid, U>
impl<Tid: Eq, U: Eq> Eq for BaseStopReason<Tid, U>
impl<Tid, U> StructuralEq for BaseStopReason<Tid, U>
impl<Tid, U> StructuralPartialEq for BaseStopReason<Tid, U>
Auto Trait Implementations
impl<Tid, U> RefUnwindSafe for BaseStopReason<Tid, U> where
Tid: RefUnwindSafe,
U: RefUnwindSafe,
impl<Tid, U> Send for BaseStopReason<Tid, U> where
Tid: Send,
U: Send,
impl<Tid, U> Sync for BaseStopReason<Tid, U> where
Tid: Sync,
U: Sync,
impl<Tid, U> Unpin for BaseStopReason<Tid, U> where
Tid: Unpin,
U: Unpin,
impl<Tid, U> UnwindSafe for BaseStopReason<Tid, U> where
Tid: UnwindSafe,
U: UnwindSafe,
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