1 use super::prelude::*;
2 
3 #[derive(Debug)]
4 pub struct R;
5 
6 impl<'a> ParseCommand<'a> for R {
from_packet(buf: PacketBuf<'a>) -> Option<Self>7     fn from_packet(buf: PacketBuf<'a>) -> Option<Self> {
8         crate::__dead_code_marker!("R", "from_packet");
9 
10         // Technically speaking, the `R` packet does include a hex-encoded byte as well,
11         // but even the GDB docs mention that it's unused (heck, the source-level
12         // comments in the GDB client suggest no-one really knows what it's used for).
13         //
14         // We'll pay some lip-service to this requirement by checking the body's length,
15         // but we won't actually parse the number.
16         let body = buf.into_body();
17         if body.len() != 2 {
18             None
19         } else {
20             Some(R)
21         }
22     }
23 }
24