Overview
| Artifact ID: | 45e114d2ee509f663b7244ede65e5d2d8e02eb4b |
|---|---|
| Ticket: | 3439728fffffffffffffffffffffffffffffffff
Leave execution trace created in the same proc doesn't fire |
| User & Date: | ladayaroslav on 2011-11-18 05:16:19 |
Changes
- assignee changed to: "dgp"
- cmimetype changed to: "text/plain"
- comment changed to:
Script to reproduce: ------------- proc LTrace {args} { puts "LTrace: $args" #Hardcoded: trace remove execution test leave LTrace } proc GTrace {args} {puts "This is global trace: $args"} proc localproc {pname arglist body} { set caller [lindex [info level 1] 0] trace add execution $caller leave LTrace puts "Active traces on $caller: [trace info execution $caller]" proc $pname $arglist "uplevel 1 [list $body]" return } proc test {a b} { localproc lproc {} {puts "a=$a, b=$b"} lproc set a "A" ; set b "B" lproc } #trace add execution test leave GTrace test a 4 puts "---------" test a 5 ------------------ In tcl 8.4.19 it gives: Active traces on test: {leave LTrace} a=a, b=4 a=A, b=B LTrace: {test a 4} 0 {} leave --------- Active traces on test: {leave LTrace} a=a, b=5 a=A, b=B LTrace: {test a 5} 0 {} leave But in tcl 8.6b2 and 8.5.10: Active traces on test: {leave LTrace} a=a, b=4 a=A, b=B --------- Active traces on test: {leave LTrace} {leave LTrace} a=a, b=5 a=A, b=B LTrace: {test a 5} 0 {} leave ----- So, LTrace isn't called first time. Also, if I uncomment the line "#trace add execution test leave GTrace", then in all tcl versions result becomes: --- Active traces on test: {leave LTrace} {leave GTrace} a=a, b=4 a=A, b=B This is global trace: {test a 4} 0 {} leave LTrace: {test a 4} 0 {} leave --------- Active traces on test: {leave LTrace} {leave GTrace} a=a, b=5 a=A, b=B This is global trace: {test a 5} 0 {} leave LTrace: {test a 5} 0 {} leave - foundin changed to: "None"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "ladayaroslav"
- subsystem changed to: "46. Traces"
- title changed to:
Leave execution trace created in the same proc doesn't fire
- type changed to: "Bug"