summaryrefslogtreecommitdiffstats
path: root/generic/tclTrace.c
Commit message (Collapse)AuthorAgeFilesLines
* Merg [3148192] implementation fix, and caveat commentjan.nijtmans2011-06-201-0/+10
|\ | | | | FossilOrigin-Name: d4da13a54e9660ab0d96663740fc0758503e8c19
| * 3062331 Caveat added to comments.dgp2011-06-171-0/+10
| | | | | | FossilOrigin-Name: 143461c50b6bb58fb128dc5de83321518776a7be
* | More generation of error codes ([format], [after], [trace], RE optimizer).dkf2011-04-041-0/+8
| | | | | | FossilOrigin-Name: 71006642401f1cd52dd505f977381307c388a2ea
* | Adjust ckalloc/ckfree macros to greatly reduce number of explicit casts indkf2011-03-121-28/+26
| | | | | | | | | | rest of Tcl source code. No ABI change. API change *should* be harmless. FossilOrigin-Name: 5574bdd262b2672cde48771787370c12854cecf4
* | Now that we're no longer using SCM based on RCS, the RCS Keyword linesdgp2011-03-021-2/+0
|\ \ | |/ | | | | | | cause more harm than good. Purged them (except in zlib files). FossilOrigin-Name: c64f310d38b977e7ae26a48bcf8bb8c50e453af7
| * Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-021-2/+0
| | | | | | | | | | more harm than good. Purged them. FossilOrigin-Name: 79367df0f0e01a96f037f893e889e7cb9b807847
| * * generic/tclTrace.c (TraceExecutionObjCmd, TraceCommandObjCmd)dkf2010-08-191-4/+4
| | | | | | | | | | | | | | | | (TraceVariableObjCmd): [Patch 3048354]: Use memcpy() instead of strcpy() to avoid buffer overflow; we have the correct length of data to copy anyway since we've just allocated the target buffer. FossilOrigin-Name: b7f158dc0fa3a9ff58336fb8c1e70400bf9b6340
| * Fix [Bug 2629338]: Stop evil unset traces from accessing freed memory.dkf2009-10-171-1/+2
| | | | | | FossilOrigin-Name: 3164b694cde7cb01dafc6be7fd7ec8d764f61052
| * * generic/tclTrace.c: Corrected handling of errors returned bydgp2008-10-081-36/+24
| | | | | | | | | | | | | | | | | | | | | | variable traces so that the errorInfo value contains the original error message. [Bug 2151707] * generic/tclVar.c: Revised implementation of TclObjVarErrMsg so that error message construction does not disturb an existing iPtr->errorInfo that may be in progress. FossilOrigin-Name: 8560e0542f70b5720497d85280d2209733c2331c
* | [Bug 3129448]: possible over-allocation on 64-bit platformsnijtmans2010-12-061-14/+13
| | | | | | FossilOrigin-Name: ea6a3428d61672e2202ae2843bbdc45ab0846888
* | Remove many type casts which are no longernecessary as a result of [Patch ↵nijtmans2010-08-221-2/+2
| | | | | | | | | | 3009403]: Signature of Tcl_GetHashKey, Tcl_(Create|Find)HashEntry FossilOrigin-Name: 0ca694ea6522833fe5c429c99b8a6b4c0e554589
* | * generic/tclTrace.c (TraceExecutionObjCmd, TraceCommandObjCmd)dkf2010-08-191-4/+4
| | | | | | | | | | | | | | | | (TraceVariableObjCmd): [Patch 3048354]: Use memcpy() instead of strcpy() to avoid buffer overflow; we have the correct length of data to copy anyway since we've just allocated the target buffer. FossilOrigin-Name: 8bc231bd37b1fa09c44e507f4ac86eb28718e50a
* | More tidying up (whitespace, spelling, useless parentheses, useless casts)dkf2010-02-241-4/+3
| | | | | | FossilOrigin-Name: 511d94dd873e4ace6252b896eeb821f03023f00f
* | Fix [Bug 2881259].dkf2009-10-211-2/+2
| | | | | | FossilOrigin-Name: e687e18dae997bd7a19f74c2e9df2748a95d39a9
* | Fix [Bug 2629338]: Stop evil unset traces from accessing freed memory.dkf2009-10-171-7/+8
| | | | | | FossilOrigin-Name: 092a1af5b4701d300445fe95a742c4c364155a16
* | - eliminate some unnessary type castsnijtmans2009-02-101-17/+18
| | | | | | | | | | | | | | - some internal const decorations - spacing FossilOrigin-Name: a45c7b126b9137976cd91960cb3e2ecb5201d222
* | Style improvements - invoking callbacks without visual junk.dkf2008-10-261-9/+9
| | | | | | FossilOrigin-Name: a1a8afc25d47810e677f42869f79723f80f3d6a6
* | Add "const" to many internalnijtmans2008-10-161-7/+7
| | | | | | | | | | | | | | const tables. No functional or API change. FossilOrigin-Name: f03d2e2d83be42035c4aad3b01bbd09f5a967c1b
* | * generic/tclTrace.c: Corrected handling of errors returned bydgp2008-10-081-36/+24
| | | | | | | | | | | | | | | | | | | | | | variable traces so that the errorInfo value contains the original error message. [Bug 2151707] * generic/tclVar.c: Revised implementation of TclObjVarErrMsg so that error message construction does not disturb an existing iPtr->errorInfo that may be in progress. FossilOrigin-Name: 05c091d99729b0aad735a2c01583c54f96f1f637
* | * generic/tclTrace.test (TraceVarProc):msofer2008-09-051-2/+15
| | | | | | | | | | | | | | * generic/unsupported.test: insure that unset traces are run even when the coroutine is unwinding [Bug 2093947] FossilOrigin-Name: 2d3237155705199bb5afead31b59e687e52f35da
* | generic/tclExecute.c formatting only: remove spaces at the end of a every ↵nijtmans2008-08-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | line generic/tclConfig.c make the internal cfg variable const. generic/tclTrace.c add a "const" keyword, allowing the "traceSubCmds[]" array to be placed by the C- compiler in a code segment in stead of a data segment Those harmless changes are as a preparation for a future change proposal. Unfortunately, my (Eclipse) editor automatically removes spaces at the end of every line. Creating a patch for this proposal should not contain unrelated harmless changes, so therefore this separate check-in. No change in functionality. No risk. FossilOrigin-Name: 697472b8f78e61ec141e6ad509bd8df1fb9229e7
* | fix [2021443] inconsistant "wrong # args" messagesnijtmans2008-07-191-3/+3
| | | | | | FossilOrigin-Name: 1e5261316ed076ff5ff69f2a720e8eff30fcf66e
* | Small clarifications that code a bit nicer to read.dkf2008-05-301-135/+124
|/ | | FossilOrigin-Name: 09791774694158691869140d936c5d492672d821
* merge stable branch onto HEADdgp2007-12-131-1/+1
| | | FossilOrigin-Name: d1f7550cd9bf1343d8505fb99fc5141b58bb88bf
* Add comments for clarity.dkf2007-11-151-120/+131
| | | FossilOrigin-Name: cf2ed4f8e4a99916bc39bede28485b8f3b64d050
* Generate literal values more efficiently using TclNewLiteralStringObj macro.dkf2007-09-171-36/+34
| | | FossilOrigin-Name: 9c077526f1cfc6e23453cdcb65def42278b3b6b6
* VarReform [Patch 1750051]msofer2007-07-311-69/+149
| | | | | | *** POTENTIAL INCOMPATIBILITY *** (tclInt.h and tclCompile.h) FossilOrigin-Name: 2fbb34460171f3c14e4ea5ca51b05b73fe911487
* comment fixmsofer2007-07-241-3/+2
| | | FossilOrigin-Name: 4852e811e8d993de0c580869c4c51a5d0d8108af
* * generic/tclBasic.c (TEOvI, GetCommandSource):msofer2007-07-241-35/+2
| | | | | | | | | | | | * generic/tclExecute.c (TEBC, TclGetSrcInfoForCmd): * generic/tclInt.h: * generic/tclTrace.c (TclCheck(Interp|Execution)Traces): Removed the need for TEBC to inspect the command before calling TEOvI, leveraging the TIP 282 infrastructure. Moved the generation of a correct nul-terminated command string away from the trace code, back into TEOvI/GetCommandSource. FossilOrigin-Name: 7d05132ec38ef7a2617073310e295f6650a57814
* Silence constness warnings for TclStackFree when building with msvc.patthoyts2007-06-281-2/+2
| | | FossilOrigin-Name: e7805530ef3bc12e7f28716d94953b2ead971f41
* * generic/tclTrace.c: Corrected broken trace reversal logic indgp2007-06-271-4/+4
| | | | | | | | * generic/tclTest.c: TclCheckInterpTraces that led to infinite loop * tests/trace.test: when multiple Tcl_CreateTrace traces were set and one of them did not fire due to level restrictions. [Bug 1743931]. FossilOrigin-Name: 73868a81de5be2a9df62e4334f190fcabccbca16
* * generic/tclInt.decls: Revised the interfaces of the routinesdgp2007-06-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclExecute.c: TclStackAlloc and TclStackFree to make them easier for callers to use (or more precisely, harder to misuse). TclStackFree now takes a (void *) argument which is the pointer intended to be freed. TclStackFree will panic if that's not actually the memory the call will free. TSA/TSF also now tolerate receiving (interp == NULL), in which case they simply fall back to be calls to Tcl_Alloc/Tcl_Free. * generic/tclIntDecls.h: make genstubs * generic/tclBasic.c: Updated callers * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCompCmds.c: * generic/tclCompExpr.c: * generic/tclCompile.c: * generic/tclFCmd.c: * generic/tclFileName.c: * generic/tclIOCmd.c: * generic/tclIndexObj.c: * generic/tclInterp.c: * generic/tclNamesp.c: * generic/tclProc.c: * generic/tclTrace.c: * unix/tclUnixPipe.c: FossilOrigin-Name: 4ea644b0decea73815d69d6a1d3767ed27191491
* * generic/tclBasic.c: Split TEOv in two, by separating amsofer2007-06-091-5/+41
| | | | | | | | | | | | | | | | | | | | | | | | processor for non-TCL_OK returns. Also spli TEOvI in a full version that handles non-existing and traced commands, and a separate shorter version for the regular case. * generic/tclBasic.c: Moved the generation of command strings for * generic/tclTrace.c: traces: previously in Tcl_EvalObjv(), now in TclCheck[Interp|Execution]Traces(). Also insured that the strings are properly nul terminated at the correct length [Bug 1693986] * generic/tclBasic.c: Extend usage of TclLimitReady() and * generic/tclExecute.c: (new) TclLimitExceeded() macros. * generic/tclInt.h: * generic/tclInterp.c: * generic/tclInt.h: New TclCleanupCommandMacro for core usage. * generic/tclBasic.c: * generic/tclExecute.c: * generic/tclObj.c: FossilOrigin-Name: 93a0a2cc358b6e9f3753940fc1a1fa1c98a889cf
* [Tcl Bug 1706140]dgp2007-05-071-8/+19
| | | | | | | | | | | | | | | | | | | * generic/tclLink.c (LinkTraceProc): Update Tcl_VarTraceProcs so that * generic/tclNamesp.c (Error*Read): they call Tcl_InterpDeleted() * generic/tclTrace.c (Trace*Proc): for themselves, and do not rely * generic/tclUtil.c (TclPrecTraceProc): on (frequently buggy) setting of the TCL_INTERP_DESTROYED flag by the trace core. * generic/tclVar.c: Update callers of TclCallVarTraces to not pass in the TCL_INTERP_DESTROYED flag. Also apply filters so that public routines only pass documented flag values down to lower level routines. * generic/tclTrace.c (TclCallVarTraces): The setting of the TCL_INTERP_DESTROYED flag is now done entirely within the TclCallVarTraces routine, the only place it can be done right. FossilOrigin-Name: 4fde67d5013eaf91210425a103fabdd2507b93fd
* Handle creation of Tcl_Objs from constant strings better (easier to use, moredkf2007-04-101-3/+3
| | | | | | efficient). After [Patch 1529526] (afredd) FossilOrigin-Name: 4d69119aadb4298f8e994440eb988c6c46396086
* * generic/tclBasic.c: Replace arrays on the C stack and ckallocdgp2007-04-021-7/+7
| | | | | | | | | | | | | | * generic/tclExecute.c: calls with TclStackAlloc calls to use memory * generic/tclFCmd.c: on Tcl's evaluation stack. * generic/tclFileName.c: * generic/tclIOCmd.c: * generic/tclIndexObj.c: * generic/tclInterp.c: * generic/tclNamesp.c: * generic/tclTrace.c: * unix/tclUnixPipe.c: FossilOrigin-Name: fbe8c8af9f9e911a208ffc73968ed27691b54367
* * generic/tcl.h: Modified the Tcl call stack somsofer2006-10-231-2/+2
| | | | | | | | | | | | | | | * generic/tclBasic.c: there is always a valid CallFrame, even * generic/tclCmdIL.c: at level 0 [Patch 1577278]. Most of the * generic/tclInt.h: changes involve removing tests for * generic/tclNamesp.c: iPtr->(var)framePtr==NULL. There is now a * generic/tclObj.c: CallFrame pushed at interp creation * generic/tclProc.c: with a pointer to it stored in * generic/tclTrace.c: iPtr->rootFramePtr. A second unused * generic/tclVar.c: field in Interp is hijacked to enable further functionality, currently unused (but with several FRQs depending on it). FossilOrigin-Name: 7ce1f60ab10a32500033ae216e7b3cb4515728cc
* * generic/tclTrace.c: Stop some interference between enter tracesdgp2006-04-111-4/+10
| | | | | | * tests/trace.test: and enterstep traces. [Bug 1458266] FossilOrigin-Name: d0cbd4c696e372ea70321e577f7f34db488d9cb7
* Minor cleanup to stop exporting functions that do not need to be. [Bug 971336]dkf2006-01-091-16/+16
| | | FossilOrigin-Name: b15e0df1c98580049dcdcd1b909c62037358ca2f
* * unix/tcl.m4 (Darwin): add 64bit support, check for Tiger copyfile(),das2005-11-271-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add CFLAGS to SHLIB_LD to support passing -isysroot in env(CFLAGS) to configure (flag can't be present twice, so can't be in both CFLAGS and LDFLAGS during configure), don't use -prebind when deploying on 10.4, define TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING (rdar://3171542). (SC_ENABLE_LANGINFO, SC_TIME_HANDLER): add/fix caching, fix obsolete autoconf macros. Sync with tk/unix/tcl.m4. * unix/configure.in: fix obsolete autoconf macros, sync gratuitous formatting/ordering differences with tk/unix/configure.in. * unix/Makefile.in: add CFLAGS to tclsh/tcltest link to make executable linking the same as during configure (needed to avoid loosing any linker relevant flags in CFLAGS, in particular flags that can't be in LDFLAGS). Avoid concurrent linking of tclsh and compiling of tclTestInit.o or xtTestInit.o during parallel make. (checkstubs, checkdoc, checkexports): dependency and Darwin fixes (dist): add new macosx files. * unix/tclLoadDyld.c (TclpDlopen): use NSADDIMAGE_OPTION_WITH_SEARCHING on second NSAddImage only. [Bug 1204237] (TclGuessPackageName): should not be MODULE_SCOPE. (TclpLoadMemory): ppc64 and endian (i386) fixes, add support for loading universal (fat) bundles from memory. * unix/tclUnixFCmd.c: * macosx/tclMacOSXFCmd.c: ppc64 and endian (i386) fixes. (TclMacOSXCopyFileAttributes): add support for new Tiger copyfile() API to enable copying of xattrs & ACLs by [file copy]. * generic/tcl.h: add Darwin specifc configure overrides for TCL_WIDE defines to support fat compiles of ppc and ppc64 at the same time, (replaces Darwin CVS fix by emoy, rdar://3693001). add/correct location of version numbers in macosx files. * generic/tclInt.h: clarify fat compile comment. * unix/tclUnixPort.h: add Darwin specifc configure overrides to support fat compiles, where configure runs only once for multiple architectures (replaces Darwin CVS fix by emoy, rdar://3693001). * macosx/tclMacOSXBundle.c: * macosx/tclMacOSXNotify.c: * unix/tclUnixNotfy.c: * unix/tclUnixPort.h: fix #include order to support compile time override of HAVE_COREFOUNDATION in tclUnixPort.h when building for ppc64 * macosx/Tcl.pbproj/default.pbxuser (new file): * macosx/Tcl.pbproj/jingham.pbxuser: * macosx/Tcl.pbproj/project.pbxproj: * macosx/Tcl.xcode/default.pbxuser (new file): * macosx/Tcl.xcode/project.pbxproj (new file): * macosx/Tcl.xcodeproj/default.pbxuser (new file): * macosx/Tcl.xcodeproj/project.pbxproj (new file): new/updated projects for Xcode 2.2 on 10.4, Xcode 1.5 on 10.3 & ProjectBuilder on 10.2, with native tcltest targets and support for universal (fat) compiles. * macosx/README: clarification/cleanup, document new Xcode projects and universal (fat) builds via CFLAGS (i.e. all of ppc ppc64 i386 at once). * unix/Makefile.in: * unix/aclocal.m4: * unix/configure.in: * unix/dltest/Makefile.in: * macosx/configure.ac (new file): add support for inclusion of unix/configure.in by macosx/configure.ac, allows generation of a config headers enabled configure script in macosx (required by Xcode projects). * macosx/GNUmakefile: rename from Makefile to avoid overwriting by configure run in tcl/macosx, add support for reusing configure cache, build target fixes, remove GENERIC_FLAGS override now handled by tcl.m4. * generic/tcl.decls: add Tcl_Main declaration as comment to avoid 'checkstubs' target complaining about it missing from stubs. * generic/regex.h: * generic/tclDate.c: * generic/tclEnv.c: * generic/tclGetDate.y: * generic/tclIOUtil.c: * generic/tclObj.c: * generic/tclStubInit.c: * generic/tclStubLib.c: * generic/tclPathObj.c: * generic/tclThreadAlloc.c: * generic/tclThreadStorage.c: * generic/tclTrace.c: * generic/tclVar.c: * generic/tommath.h: * tools/fix_tommath_h.tcl: * unix/tclUnixFCmd.c: ensure externally visible symbols not contained in stubs table are declared as MODULE_SCOPE (or as static if not used outside of own source file). These changes allow 'make checkstubs' to complete without error on Darwin with gcc 4. * generic/rege_dfa.c (getvacant): * generic/regexec.c (cfind): * generic/tclCompExpr.c (CompileSubExpr): * generic/tclNamesp.c (NamespaceEnsembleCmd): * unix/tclUnixChan.c (TclUnixWaitForFile): initialise variables to silence gcc 4 warnings. * generic/tclExecute.c (TclExecuteByteCode): fix unused variable warning when NO_WIDE_TYPE is defined. * generic/regguts.h: only #define NDEBUG if not already #defined. * unix/tclUnixNotfy.c: * macosx/tclMacOSXNotify.c: sync whitespace & comments. * unix/tclUnixPort.h: * win/tclWinPort.h: remove declaration of obsolete&unused TclpMutex API. * unix/configure: * unix/tclConfig.h.in: regen. FossilOrigin-Name: eac3630f7292db37c55ac25a4d7a8beeba7b83dd
* Fix for [Bug 1348775]dkf2005-11-081-32/+84
| | | FossilOrigin-Name: 9a120891dcf9074b2de14a935f0d6f05d7dd6689
* ANSIfydkf2005-11-021-219/+230
| | | FossilOrigin-Name: c8e360304c4d2d1f33cf1fb3a998e2fe3c548471
* * generic/tclTrace.c (TclCheckExecutionTraces): Corrected mistakendgp2005-11-011-13/+15
| | | | | | | assumption that all command traces are set at the script level. Report/fix from Jacques H. de Villiers. [Bug 1337941] FossilOrigin-Name: 409332adfdac7f3b77c93a61caaa5b97de92aede
* * generic/tclTrace.c (TraceVarProc): [Bug 1337229], partialmsofer2005-10-291-4/+6
| | | | | | | | | | | fix. Insure that a second call with TCL_TRACE_DESTROYED does not lead to a second call to Tcl_EventuallyFree(). It is still true that that second call should not happen, so the bug is not completely fixed. * tests/trace.test (test-18.3-4): added tests for bugs #1337229 and 1338280. FossilOrigin-Name: 8556859742ed79834ffaa37eaaed6334bdbe8d65
* Getting more systematic about styledkf2005-07-231-1287/+1332
| | | FossilOrigin-Name: 78a871bd80bb122bf5d3ea3342b8634237fd123f
* * generic/tclBasic.c: Added missing walk of the list of active tracesdgp2005-06-211-5/+37
| | | | | | | | | * generic/tclTrace.c: to cleanup references to traces being deleted. * generic/tclInt.h: [Bug 1201035] Made the walk of the active trace * tests/trace.test (trace-34.*): list aware of the direction of trace scanning, so the proper correction can be made. [Bug 1224585] FossilOrigin-Name: aa95aa1c1e6828705a6df9cd6bd73f2b5d1fae48
* Fix [Bug 1220058] and quash a bizarre case which generated a bogus error msg.dkf2005-06-141-1/+7
| | | | | | Thanks to Will Duquette for helping to track this one down. FossilOrigin-Name: dd2595e57a056b926bbf71cac19deca339e7ec6a
* Merged kennykb-numerics-branch back to the head; TIPs 132 and 232kennykb2005-05-101-1/+1
| | | FossilOrigin-Name: 1cc2336920c70c6b9f7825b88dec87fc223f2c4e
* * generic/tclTrace.c (TclCheckInterpTraces): Corrected mistakendgp2005-03-101-14/+13
| | | | | | | | | | | cast of ClientData to (TraceCommandInfo *) when not warranted. Thanks to Yuri Victorovich for the report. [Bug 1153871] * generic/tcl.h: Moved flag values TCL_TRACE_ENTER_EXEC and * generic/tclInt.h: TCL_TRACE_LEAVE_EXEC from public interface into private. Should be used only by internal workings of execution traces. FossilOrigin-Name: 85a049e997c5a4396464c119de40e7df9aa044fe
* * generic/tclInt.h: Added comment warning that the olddgp2004-11-151-87/+36
| | | | | | | | | | | | ERR_IN_PROGRESS and ERROR_CODE_SET flag values should not be re-used for the sake of those extensions that have accessed them. * generic/tclCmdMZ.c (Tcl_TraceObjCmd): Fixed Bug 1065378 which failed * tests/trace.test (trace-33.1): to permit a variable trace created with [trace variable] to be destroyed with [trace remove]. Thanks to Keith Vetter for the report. FossilOrigin-Name: 888788f6f9a654fa97ee55be188c3053b9396094