Implement execute breakpoints
This commit is contained in:
+18
-1
@@ -307,6 +307,22 @@ impl GdbConnection {
|
||||
} else {
|
||||
self.response()
|
||||
}
|
||||
} else if req.match_str("Z0,") {
|
||||
if let Some(address) = req.match_hex() {
|
||||
self.client
|
||||
.send_command(EmulatorCommand::AddBreakpoint(self.sim_id, address));
|
||||
self.response().write_str("OK")
|
||||
} else {
|
||||
self.response()
|
||||
}
|
||||
} else if req.match_str("z0,") {
|
||||
if let Some(address) = req.match_hex() {
|
||||
self.client
|
||||
.send_command(EmulatorCommand::RemoveBreakpoint(self.sim_id, address));
|
||||
self.response().write_str("OK")
|
||||
} else {
|
||||
self.response()
|
||||
}
|
||||
} else {
|
||||
// unrecognized command
|
||||
self.response()
|
||||
@@ -331,7 +347,8 @@ impl Drop for GdbConnection {
|
||||
|
||||
fn debug_stop_reason_string(reason: Option<DebugStopReason>) -> &'static str {
|
||||
match reason {
|
||||
Some(DebugStopReason::Trapped) => "T05;thread:p1.t1;threads:p1.t1;reason:trap;",
|
||||
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