Skip to content

Commit 8552d46

Browse files
committed
Update checkpoints and wait for ack in reset
1 parent 1acea7c commit 8552d46

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/main/kotlin/be/ugent/topl/mio/debugger/Debugger.kt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,15 @@ open class Debugger(private val connection: Connection, start: Boolean = true, p
392392
fun dumpVMState() = send(10)
393393
fun dumpLocals() = send(11)
394394
fun dumpStateAndLocals() = send(12)
395-
fun reset() = send(13)
395+
396+
open fun reset() {
397+
val firstState = checkpoints.first()
398+
checkpoints.clear()
399+
checkpoints.add(firstState)
400+
send(13)
401+
messageQueue.waitForResponse("Reset WARDuino.")
402+
checkpointsUpdated()
403+
}
396404

397405
fun snapshot(): String {
398406
send(60)

0 commit comments

Comments
 (0)