Artifact
11cda3701a7992062ac74739405e02ca4153dbc5671deea9c9f5dc7d465db1bd:
Attachment "exercise.tcl" to
ticket [0e3f777ed5]
added by
erikleunissen
2026-07-25 15:23:12.
0000: 70 72 6f 63 20 70 20 7b 7d 20 7b 0a 20 20 20 20 proc p {} {.
0010: 23 20 54 68 69 73 20 70 72 6f 63 20 6e 65 65 64 # This proc need
0020: 73 20 74 6f 20 68 6f 6c 64 20 61 74 20 6c 65 61 s to hold at lea
0030: 73 74 20 6f 6e 65 20 28 61 72 62 69 74 72 61 72 st one (arbitrar
0040: 79 29 20 63 6f 6d 6d 61 6e 64 0a 20 20 20 20 23 y) command. #
0050: 20 66 6f 72 20 65 6e 74 65 72 73 74 65 70 20 74 for enterstep t
0060: 72 61 63 65 73 20 74 6f 20 77 6f 72 6b 2e 0a 20 races to work..
0070: 20 20 20 70 75 74 73 20 22 70 20 69 6e 76 6f 6b puts "p invok
0080: 65 64 22 0a 7d 0a 70 72 6f 63 20 68 61 6e 64 6c ed".}.proc handl
0090: 65 54 72 61 63 65 31 20 7b 61 72 67 73 7d 20 7b eTrace1 {args} {
00a0: 0a 20 20 20 20 74 72 61 63 65 20 72 65 6d 6f 76 . trace remov
00b0: 65 20 65 78 65 63 75 74 69 6f 6e 20 70 20 65 6e e execution p en
00c0: 74 65 72 73 74 65 70 20 68 61 6e 64 6c 65 54 72 terstep handleTr
00d0: 61 63 65 31 0a 7d 0a 70 72 6f 63 20 68 61 6e 64 ace1.}.proc hand
00e0: 6c 65 54 72 61 63 65 30 20 7b 61 72 67 73 7d 20 leTrace0 {args}
00f0: 7b 0a 20 20 20 20 74 72 61 63 65 20 61 64 64 20 {. trace add
0100: 65 78 65 63 75 74 69 6f 6e 20 70 20 65 6e 74 65 execution p ente
0110: 72 73 74 65 70 20 68 61 6e 64 6c 65 54 72 61 63 rstep handleTrac
0120: 65 31 0a 7d 0a 74 72 61 63 65 20 61 64 64 20 65 e1.}.trace add e
0130: 78 65 63 75 74 69 6f 6e 20 70 20 6c 65 61 76 65 xecution p leave
0140: 20 68 61 6e 64 6c 65 54 72 61 63 65 30 0a 74 72 handleTrace0.tr
0150: 61 63 65 20 61 64 64 20 65 78 65 63 75 74 69 6f ace add executio
0160: 6e 20 70 20 6c 65 61 76 65 20 68 61 6e 64 6c 65 n p leave handle
0170: 54 72 61 63 65 30 0a 70 0a 70 0a Trace0.p.p.