pub struct GdbStubError<T, C> { /* private fields */ }
Expand description
An error which may occur during a GDB debugging session.
§Additional Notes
GdbStubError
’s inherent Display
impl typically contains enough context
for users to understand why the error occurred.
That said, there are a few instances where the error condition requires additional context.
User error: cannot report stop reason without also implementing its corresponding IDET
This is a not a bug with gdbstub
. Rather, this is indicative of a bug in
your gdbstub
integration.
Certain stop reasons can only be used when their associated protocol feature
has been implemented. e.g: a Target cannot return a StopReason::HwBreak
if
the hardware breakpoints IDET hasn’t been implemented.
Please double-check that you’ve implemented all the necessary supports_
methods related to the stop reason you’re trying to report.
Received an unexpected step
request. This is most-likely due to this GDB client bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28440
Unfortunately, there’s nothing gdbstub
can do to work around this bug.
Until the issue is fixed upstream, certain architectures are essentially forced to manually implement single-step support.
Implementations§
source§impl<T, C> GdbStubError<T, C>
impl<T, C> GdbStubError<T, C>
sourcepub fn is_target_error(&self) -> bool
pub fn is_target_error(&self) -> bool
Check if the error was due to a target error.
sourcepub fn into_target_error(self) -> Option<T>
pub fn into_target_error(self) -> Option<T>
If the error was due to a target error, return the concrete error type.
sourcepub fn is_connection_error(&self) -> bool
pub fn is_connection_error(&self) -> bool
Check if the error was due to a connection error.
sourcepub fn into_connection_error(self) -> Option<(C, ConnectionErrorKind)>
pub fn into_connection_error(self) -> Option<(C, ConnectionErrorKind)>
If the error was due to a connection error, return the concrete error type.