pub enum DebuggerState {
Idle,
Building,
Ready,
Starting,
Running,
Paused,
Exited,
Failed,
}Expand description
Where the debugger currently is.
Variants§
Idle
Nothing is loaded and nothing is running.
Building
The project is being assembled and linked.
Ready
A debuggable executable exists but no session is running.
Starting
GDB is starting and loading the program.
Running
The program is executing; the debugger cannot inspect it.
Paused
The program is stopped and can be inspected and stepped.
Exited
The program finished.
Failed
Something went wrong and the session cannot continue.
Implementations§
Source§impl DebuggerState
impl DebuggerState
Sourcepub const ALL: [DebuggerState; 8]
pub const ALL: [DebuggerState; 8]
Every state, for exhaustive testing and display.
Sourcepub const fn is_session_active(self) -> bool
pub const fn is_session_active(self) -> bool
Whether a debug session exists, whether or not it is stopped.
Sourcepub const fn can_inspect(self) -> bool
pub const fn can_inspect(self) -> bool
Whether the program is stopped and inspectable.
Reading registers, memory, the stack or the disassembly is only meaningful here: while the program runs, any value read is stale before it can be displayed.
Sourcepub const fn can_continue(self) -> bool
pub const fn can_continue(self) -> bool
Whether execution can be resumed.
Sourcepub const fn can_interrupt(self) -> bool
pub const fn can_interrupt(self) -> bool
Whether the program can be interrupted.
Sourcepub const fn can_launch(self) -> bool
pub const fn can_launch(self) -> bool
Whether a new session can be launched.
Sourcepub const fn can_build(self) -> bool
pub const fn can_build(self) -> bool
Whether a build can be started.
Building while a session holds the executable open would replace the file underneath the running debugger, so it is refused until the session ends.
Sourcepub const fn can_edit_breakpoints(self) -> bool
pub const fn can_edit_breakpoints(self) -> bool
Whether breakpoints can be edited right now.
Before a session starts they are recorded and applied on launch; while paused GDB accepts them directly. While the program runs they are deferred, so the UI disables the action rather than appearing to work.
Trait Implementations§
Source§impl Clone for DebuggerState
impl Clone for DebuggerState
impl Copy for DebuggerState
Source§impl Debug for DebuggerState
impl Debug for DebuggerState
Source§impl Default for DebuggerState
impl Default for DebuggerState
Source§impl Display for DebuggerState
impl Display for DebuggerState
impl Eq for DebuggerState
Source§impl Hash for DebuggerState
impl Hash for DebuggerState
Source§impl PartialEq for DebuggerState
impl PartialEq for DebuggerState
impl StructuralPartialEq for DebuggerState
Auto Trait Implementations§
impl Freeze for DebuggerState
impl RefUnwindSafe for DebuggerState
impl Send for DebuggerState
impl Sync for DebuggerState
impl Unpin for DebuggerState
impl UnsafeUnpin for DebuggerState
impl UnwindSafe for DebuggerState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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 moreSource§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more