summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
authorhobbs <hobbs>2002-06-17 22:52:49 (GMT)
committerhobbs <hobbs>2002-06-17 22:52:49 (GMT)
commit6bc33db4402cc162594aa68e4d6450291e48600a (patch)
treeb5d79214f48fc5c3dc434770f408c2312858ead9 /generic/tclExecute.c
parentfa7841d0e75180973f3f51747c79bcd341e8876b (diff)
downloadtcl-6bc33db4402cc162594aa68e4d6450291e48600a.zip
tcl-6bc33db4402cc162594aa68e4d6450291e48600a.tar.gz
tcl-6bc33db4402cc162594aa68e4d6450291e48600a.tar.bz2
* doc/CrtTrace.3: Added TIP#62 implementation of command
* doc/trace.n: execution tracing [FR #462580] (lavana). * generic/tcl.h: This includes enter/leave tracing as well * generic/tclBasic.c: as inter-procedure stepping. * generic/tclCmdMZ.c: * generic/tclCompile.c: * generic/tclExecute.c: * generic/tclInt.decls: * generic/tclInt.h: * generic/tclIntDecls.h: * generic/tclStubInit.c: * generic/tclVar.c: * tests/trace.test:
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r--generic/tclExecute.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index b1893f2..f5949af 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.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: tclExecute.c,v 1.69 2002/06/16 17:59:12 msofer Exp $
+ * RCS: @(#) $Id: tclExecute.c,v 1.70 2002/06/17 22:52:51 hobbs Exp $
*/
#include "tclInt.h"
@@ -1240,7 +1240,8 @@ TclExecuteByteCode(interp, codePtr)
for (tracePtr = iPtr->tracePtr; tracePtr != NULL;
tracePtr = nextTracePtr) {
nextTracePtr = tracePtr->nextPtr;
- if (iPtr->numLevels <= tracePtr->level) {
+ if (tracePtr->level == 0 ||
+ iPtr->numLevels <= tracePtr->level) {
/*
* Traces will be called: get command string
*/
@@ -1249,7 +1250,13 @@ TclExecuteByteCode(interp, codePtr)
break;
}
}
- }
+ } else {
+ Command *cmdPtr;
+ cmdPtr = (Command *) Tcl_GetCommandFromObj(interp, objv[0]);
+ if (cmdPtr != NULL && cmdPtr->flags & CMD_HAS_EXEC_TRACES) {
+ bytes = GetSrcInfoForPc(pc, codePtr, &length);
+ }
+ }
/*
* A reference to part of the stack vector itself