Index: tclTrace.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclTrace.c,v
retrieving revision 1.26
diff -c -r1.26 tclTrace.c
*** tclTrace.c	23 Jul 2005 00:04:31 -0000	1.26
--- tclTrace.c	26 Oct 2005 00:04:36 -0000
***************
*** 1426,1443 ****
  	    active.reverseScan = 0;
  	    active.nextTracePtr = tracePtr->nextPtr;
  	}
! 	tcmdPtr = (TraceCommandInfo*)tracePtr->clientData;
! 	if (tcmdPtr->flags != 0) {
! 	    tcmdPtr->curFlags = traceFlags | TCL_TRACE_EXEC_DIRECT;
! 	    tcmdPtr->curCode  = code;
! 	    tcmdPtr->refCount++;
! 	    if (state == NULL) {
! 		state = Tcl_SaveInterpState(interp, code);
! 	    }
! 	    traceCode = TraceExecutionProc((ClientData)tcmdPtr, interp,
! 		    curLevel, command, (Tcl_Command)cmdPtr, objc, objv);
! 	    if ((--tcmdPtr->refCount) <= 0) {
! 		ckfree((char*)tcmdPtr);
  	    }
  	}
  	if (active.nextTracePtr) {
--- 1426,1446 ----
  	    active.reverseScan = 0;
  	    active.nextTracePtr = tracePtr->nextPtr;
  	}
! 	if (tracePtr->traceProc == TraceCommandProc) {
! 	    tcmdPtr = (TraceCommandInfo*)tracePtr->clientData;
! 	    if (tcmdPtr->flags != 0) {
! 		tcmdPtr->curFlags = traceFlags | TCL_TRACE_EXEC_DIRECT;
! 		tcmdPtr->curCode  = code;
! 		tcmdPtr->refCount++;
! 		if (state == NULL) {
! 		    state = Tcl_SaveInterpState(interp, code);
! 		}
! 		traceCode = TraceExecutionProc((ClientData)tcmdPtr, interp,
! 					       curLevel, command,
! 					       (Tcl_Command)cmdPtr, objc, objv);
! 		if ((--tcmdPtr->refCount) <= 0) {
! 		    ckfree((char*)tcmdPtr);
! 		}
  	    }
  	}
  	if (active.nextTracePtr) {
