<i>'execution trace' skips some commands</i> status still Open with 4 other changes
by
.
D 2002-10-15T00:22:28
J icomment Logged\sIn:\sYES\s\nuser_id=81875\n\nI\slooked\sinto\sthe\scode\ssection\squestioned\sby\s\sDGP.\nTclTraceExecutionObjCmd()\scalls\sTcl_TraceCommand\s\sand\spasses\non\sexecution\sflags\sto\sit\sas\swell\sas\sTraceCommandProc\sas\sits\ntrace\shandler.\sThe\sTcl_TraceCommand\sfunction\shas\sbeen\nmodified\sto\sregister\sthe\sexecution\sflags.\sHowever,\sthis\sis\nnot\scorrect\ssince\ssuch\schanges\swere\snot\smentioned\sin\stip62.\n\sAlso,\sthe\scurrent\strace\shandler\sis\scompletely\signored\s--\ncorrect\strace\shandler\sshould\shave\sbeen\sTraceExecutionProc\nwhose\scall\sis\shard-coded\sin\sTclCheckExecutionTraces.\n\nI\swill\screate\sa\spatch\ssoon\sfor\sfixing\sthe\sabove\sproblems:\nthe\schanges\smade\sto\sTcl_TraceCommand,\sTcl_UntraceCommand\sand\nTcl_CommandTraceInfo\sfor\sexecution\straces\sshould\sbe\smoved\ninto\snew\sinternal\sfunctions.\sMoreover\sa\snew\stip\swill\sbe\nrequired\sto\sexpose\sthe\sfunctionality\sof\sexecution\straces\sas\nC\sAPIs:\sTcl_TraceExecution,\sTcl_UntraceExecution,\sand\nTcl_ExecutionTraceInfo.\n\nNext,\sI\shave\screated\sa\spatch\sfor\sthe\soriginal\sproblem\nsubmitted\shere.\sIt\sincludes\sfixes\sto\stclCmdMZ.c\sfile\sand\sa\nshorter\sscript\sto\sreproduce\sthe\sproblem\sas\sa\stestcase\sin\ntrace.test.\sI\sam\sincluding\sthe\spatch\shere\ssince\sthe\supload\nbutton\sdoesn't\sshow\sup\sin\smy\sbrowser:\n\nIndex:\sgeneric/tclCmdMZ.c\n===================================================================\nRCS\sfile:\s/cvsroot/tcl/tcl/generic/tclCmdMZ.c,v\nretrieving\srevision\s1.76\ndiff\s-r1.76\stclCmdMZ.c\n49c49,54\n<\s\s\s\s\sint\sstartLevel;\s\s\s\s\s\s\s\s\s\s\s\s\s/*\sUsed\sfor\sbookkeeping\nwith\sexecution\straces\s*/\n---\n>\s\s\s\s\sint\sstartLevel;\s\s\s\s\s\s\s\s\s\s\s\s\s/*\sUsed\sfor\sbookkeeping\nwith\sstep\sexecution\n>\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s*\straces,\sstore\sthe\slevel\nat\swhich\sthe\sstep\n>\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s*\strace\swas\sinvoked\s*/\n>\s\s\s\s\schar\s*startCmd;\s\s\s\s\s\s\s\s\s\s\s\s\s/*\sUsed\sfor\sbookkeeping\nwith\sstep\sexecution\n>\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s*\straces,\sstore\sthe\ncommand\sname\swhich\sinvoked\n>\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s*\sstep\strace\s*/\n3189a3195\n>\s\s\s\s\s\s\s\s\s\s\s\s\s\s\stcmdPtr->startCmd\s=\sNULL;\n3238a3245,3247\n>\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sif\s(tcmdPtr->startCmd\s!=\sNULL)\s{\n>\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sckfree((char\n*)tcmdPtr->startCmd);\n>\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s}\n3390a3400\n>\s\s\s\s\s\s\s\s\s\s\s\s\s\s\stcmdPtr->startCmd\s=\sNULL;\n3965a3976,3978\n>\s\s\s\s\s\s\s\s\s\s\s\s\sif\s(tcmdPtr->startCmd\s!=\sNULL)\s{\n>\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sckfree((char\s*)tcmdPtr->startCmd);\n>\s\s\s\s\s\s\s\s\s\s\s}\n4292c4305,4306\n<\s\s\s\s\s\s\s\s*\screated\san\sinterpreter\strace,\swe\sremove\sit\n---\n>\s\s\s\s\s\s\s\s*\screated\san\sinterpreter\strace\sfor\senterstep\sand/or\nleavestep\n>\s\s\s\s\s\s\s\s\s\s*\sexecution\straces,\swe\sremove\sit\shere.\n4295c4309,4310\n<\s\s\s\s\s\s\s\s\s\s\sif\s((tcmdPtr->stepTrace\s!=\sNULL)\s&&\s(level\s==\ntcmdPtr->startLevel))\s{\n---\n>\s\s\s\s\s\s\s\s\s\s\sif\s((tcmdPtr->stepTrace\s!=\sNULL)\s&&\s(level\s==\ntcmdPtr->startLevel)\n>\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s&&\s(strcmp(command,\stcmdPtr->startCmd)\s==\n0))\s{\n4297a4313,4315\n>\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sif\s(tcmdPtr->startCmd\s!=\sNULL)\s{\n>\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sckfree((char\s*)tcmdPtr->startCmd);\n>\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s}\n4299d4316\n<\s\s\s\s\s\s\s\s\s\s\s\n4384,4385c4401,4406\n<\s\s\s\s\s\s\s\s*\sThird,\screate\san\sinterpreter\strace,\sif\swe\sneed\none\sfor\n<\s\s\s\s\s\s\s\s*\ssubsequent\sinternal\sexecution\straces.\n---\n>\s\s\s\s\s\s\s\s*\sThird,\sif\sthere\sare\sany\sstep\sexecution\straces\sfor\nthis\sproc,\n>\s\s\s\s\s\s\s\s\s\s*\swe\sregister\san\sinterpreter\strace\sto\sinvoke\nenterstep\sand/or\n>\s\s\s\s\s\s\s\s*\sleavestep\straces.\n>\s\s\s\s\s\s\s\s*\sWe\salso\sneed\sto\ssave\sthe\scurrent\sstack\slevel\sand\nthe\sproc\n>\s\s\s\s\s\s\s\s\s\s*\sstring\sin\sstartLevel\sand\sstartCmd\sso\sthat\swe\ncan\sdelete\sthis\n>\s\s\s\s\s\s\s\s\s\s*\sinterpreter\strace\swhen\sit\sreaches\sthe\send\sof\nthis\sproc.\n4389a4411,4413\n>\s\s\s\s\s\s\s\s\s\s\s\s\s\s\stcmdPtr->startCmd\s=\s\n>\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s(char\s*)\sckalloc((unsigned)\n(strlen(command)\s+\s1));\n>\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sstrcpy(tcmdPtr->startCmd,\scommand);\n4398a4423,4425\n>\s\s\s\s\s\s\s\s\s\s\s\s\sif\s(tcmdPtr->startCmd\s!=\sNULL)\s{\n>\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sckfree((char\s*)tcmdPtr->startCmd);\n>\s\s\s\s\s\s\s\s\s\s\s}\nIndex:\stests/trace.test\n===================================================================\nRCS\sfile:\s/cvsroot/tcl/tcl/tests/trace.test,v\nretrieving\srevision\s1.22\ndiff\s-r1.22\strace.test\n1840a1841,1870\n>\stest\strace-28.1\s{enterstep\sand\sleavestep\straces\swith\nupdate\sidletasks\s(615043)}\s{\n>\s\s\s\s\scatch\s{rename\sfoo\s{}}\n>\s\s\s\s\sproc\sfoo\s{}\s{\n>\s\s\s\s\s\s\s\s\sset\sa\s1\n>\s\s\s\s\s\s\s\s\supdate\sidletasks\n>\s\s\s\s\s\s\s\s\sset\sb\s1\n>\s\s\s\s\s}\n>\s\n>\s\s\s\s\sset\sinfo\s{}\n>\s\s\s\s\strace\sadd\sexecution\sfoo\s{enter\senterstep\sleavestep\nleave}\s\\\n>\s\s\s\s\s\s\s\s\s[list\straceExecute\sfoo]\n>\s\s\s\s\supdate\n>\s\s\s\s\safter\sidle\s{puts\sidle}\n>\s\s\s\s\sfoo\n>\s\n>\s\s\s\s\strace\sremove\sexecution\sfoo\s{enter\senterstep\sleavestep\nleave}\s\\\n>\s\s\s\s\s\s\s\s\s[list\straceExecute\sfoo]\n>\s\s\s\s\srename\sfoo\s{}\n>\s\s\s\s\sjoin\s$info\s"\\n"\n>\s}\s{foo\sfoo\senter\n>\sfoo\s{set\sa\s1}\senterstep\n>\sfoo\s{set\sa\s1}\s0\s1\sleavestep\n>\sfoo\s{update\sidletasks}\senterstep\n>\sfoo\s{puts\sidle}\senterstep\n>\sfoo\s{puts\sidle}\s0\s{}\sleavestep\n>\sfoo\s{update\sidletasks}\s0\s{}\sleavestep\n>\sfoo\s{set\sb\s1}\senterstep\n>\sfoo\s{set\sb\s1}\s0\s1\sleavestep\n>\sfoo\sfoo\s0\s1\sleave}\n>\s\n1845a1876,1878\n>\s\n>\s#\sUnset\sthe\svaraible\swhen\sdone\n>\scatch\s{unset\sinfo}\n\n\n\n
J login hemanglavana
J mimetype text/plain
J username hemanglavana
K 615043ffffffffffffffffffffffffffffffffff
U hemanglavana
Z e90261237fd5908eff8d54914dd776c6