@@ -6,6 +6,7 @@ import be.ugent.topl.mio.woodstate.Checkpoint
66import be.ugent.topl.mio.woodstate.HexaEncoder
77import be.ugent.topl.mio.woodstate.WOODDumpResponse
88import be.ugent.topl.mio.woodstate.WOODState
9+ import com.fasterxml.jackson.core.JacksonException
910import com.fasterxml.jackson.databind.ObjectMapper
1011import com.fasterxml.jackson.module.kotlin.registerKotlinModule
1112import java.io.Closeable
@@ -72,7 +73,7 @@ open class Debugger(private val connection: Connection, start: Boolean = true, p
7273 checkpoints.add(checkpoint)
7374
7475 checkpointsUpdated()
75- } catch (e: Exception ) {
76+ } catch (e: JacksonException ) {
7677 println (" ERROR!" )
7778 println (payloadStr)
7879 println (e)
@@ -453,11 +454,19 @@ open class Debugger(private val connection: Connection, start: Boolean = true, p
453454 class AtEveryInstruction () : SnapshotPolicy(1 ) {
454455 override fun toString () = " Snapshot at every instruction"
455456 }
456- data class Checkpointing (val interval : Int = 20 ) : SnapshotPolicy(2 ) {
457+ data class Checkpointing (val interval : Int = 100 ) : SnapshotPolicy(2 ) {
457458 override fun serialize (): String {
458459 return super .serialize() + HexaEncoder .serializeUInt32BE(interval)
459460 }
460461 }
462+ data class Tracing (val minimumArgCount : Int = 1 , val states : List <ExecutionState >) : SnapshotPolicy(3 ) {
463+ override fun serialize (): String {
464+ return super .serialize() +
465+ HexaEncoder .convertToLEB128(minimumArgCount) +
466+ HexaEncoder .convertToLEB128(states.size) +
467+ states.joinToString(" " ) { HexaEncoder .convertToLEB128(it.ordinal + 1 ) }
468+ }
469+ }
461470 }
462471
463472 fun setSnapshotPolicy (policy : SnapshotPolicy ) {
0 commit comments