summaryrefslogtreecommitdiffstats
path: root/generic/tclTrace.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2005-11-01 20:17:10 (GMT)
committerdgp <dgp@users.sourceforge.net>2005-11-01 20:17:10 (GMT)
commitf2332264c55b9ab52d0cfa33c31a6b2e89e97e7d (patch)
tree7d8c5aa0a80bfe6ee5fae1136e72b5427ab415ff /generic/tclTrace.c
parent1b435abc4154bcc21eab372039b43f00d9216aff (diff)
downloadtcl-f2332264c55b9ab52d0cfa33c31a6b2e89e97e7d.zip
tcl-f2332264c55b9ab52d0cfa33c31a6b2e89e97e7d.tar.gz
tcl-f2332264c55b9ab52d0cfa33c31a6b2e89e97e7d.tar.bz2
* generic/tclTrace.c (TclCheckExecutionTraces): Corrected mistaken
assumption that all command traces are set at the script level. Report/fix from Jacques H. de Villiers. [Bug 1337941]
Diffstat (limited to 'generic/tclTrace.c')
-rw-r--r--generic/tclTrace.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/generic/tclTrace.c b/generic/tclTrace.c
index 6976a06..db9f892 100644
--- a/generic/tclTrace.c
+++ b/generic/tclTrace.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclTrace.c,v 1.27 2005/10/29 19:16:32 msofer Exp $
+ * RCS: @(#) $Id: tclTrace.c,v 1.28 2005/11/01 20:17:10 dgp Exp $
*/
#include "tclInt.h"
@@ -1426,18 +1426,20 @@ TclCheckExecutionTraces(interp, command, numChars, cmdPtr, code, traceFlags,
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 (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) {