Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 9618346f3fa8e4ea51fd61be135641ffa13f6a64
Ticket: 655645ffffffffffffffffffffffffffffffffff
trace leavestep fires too early
User & Date: nobody on 2002-12-18 09:54:30
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    [email protected]
    
    Command execution traces for "leavestep" fire even 
    before the respective "enterstep", with null string result, 
    and then again (correctly) after the command has been 
    executed. This happens for all but the first command in 
    a proc.
    
    Demo script:
    
    proc enterStep {cmd op} {puts "enter $cmd/$op"}
    proc leaveStep {cmd code result op} {puts "leave $cmd/
    $code/$result/$op"}
    
    proc foo x {
        puts x=$x
        puts [info patchlevel]
        incr x
    }
    trace add execution foo enterstep enterStep
    trace add execution foo leavestep leaveStep
    foo 42
    
    produces (8.4.1, W2k, Solaris):
    
    enter puts x=42/enterstep
    x=42
    leave puts x=42/0//leavestep
    leave info patchlevel/0//leavestep
    enter info patchlevel/enterstep
    leave info patchlevel/0/8.4.1/leavestep
    leave puts 8.4.1/0//leavestep
    enter puts 8.4.1/enterstep
    8.4.1
    leave puts 8.4.1/0//leavestep
    leave incr x/0//leavestep
    enter incr x/enterstep
    leave incr x/0/43/leavestep
    
    
  4. foundin changed to: "obsolete: 8.4.1"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "18. Commands M-Z"
  10. title changed to: "trace leavestep fires too early"
  11. type changed to: "Bug"