Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Toggle support for
QStartNoAckMode
(#135)
* Toggle support for `QStartNoAckMode` * Compile-out packet parsing if mode is disabled
- Loading branch information
Showing
6 changed files
with
60 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
use super::prelude::*; | ||
use crate::protocol::commands::ext::NoAckMode; | ||
|
||
impl<T: Target, C: Connection> GdbStubImpl<T, C> { | ||
pub(crate) fn handle_no_ack_mode( | ||
&mut self, | ||
_res: &mut ResponseWriter<'_, C>, | ||
target: &mut T, | ||
command: NoAckMode, | ||
) -> Result<HandlerStatus, Error<T::Error, C::Error>> { | ||
if !target.use_no_ack_mode() { | ||
return Ok(HandlerStatus::Handled); | ||
} | ||
|
||
crate::__dead_code_marker!("no_ack_mode", "impl"); | ||
|
||
let handler_status = match command { | ||
NoAckMode::QStartNoAckMode(_) => { | ||
self.features.set_no_ack_mode(true); | ||
HandlerStatus::NeedsOk | ||
} | ||
}; | ||
Ok(handler_status) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters