Implement stepping
This commit is contained in:
+8
-1
@@ -258,6 +258,12 @@ impl GdbConnection {
|
||||
self.stop_reason = None;
|
||||
// Don't send a response until we hit a breakpoint or get interrupted
|
||||
return Ok(None);
|
||||
} else if req.match_str("s") {
|
||||
self.client
|
||||
.send_command(EmulatorCommand::DebugStep(self.sim_id));
|
||||
self.stop_reason = None;
|
||||
// Don't send a response until we hit a breakpoint or get interrupted
|
||||
return Ok(None);
|
||||
} else if req.match_str("p") {
|
||||
let mut read_register = || {
|
||||
let register_index = req.match_hex::<usize>()?;
|
||||
@@ -348,7 +354,8 @@ impl Drop for GdbConnection {
|
||||
|
||||
fn debug_stop_reason_string(reason: Option<DebugStopReason>) -> &'static str {
|
||||
match reason {
|
||||
Some(DebugStopReason::Breakpoint) => "T05;thread:p1.t1;threads;p1.t1;reason:breakpoint",
|
||||
Some(DebugStopReason::Trace) => "T05;thread:p1.t1;threads:p1.t1;reason:trace;",
|
||||
Some(DebugStopReason::Breakpoint) => "T05;thread:p1.t1;threads:p1.t1;reason:breakpoint;",
|
||||
Some(DebugStopReason::Trapped) => "T05;swbreak;thread:p1.t1;threads:p1.t1;reason:trap;",
|
||||
None => "T00;thread:p1.t1;threads:p1.t1;",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user