diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2007-09-25 20:27:17 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2007-09-25 20:27:17 (GMT) |
commit | 672cb039e55156194700decdd3ab48d444249b4a (patch) | |
tree | 8f3fb850f2394af6bdd6ca36cb82dc3506cabe47 /generic/tclBasic.c | |
parent | 07010d008140290042f0c4f42cc7892cd4ddf12e (diff) | |
download | tcl-672cb039e55156194700decdd3ab48d444249b4a.zip tcl-672cb039e55156194700decdd3ab48d444249b4a.tar.gz tcl-672cb039e55156194700decdd3ab48d444249b4a.tar.bz2 |
Add a new command, ::tcl::unsupported::disassemble
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r-- | generic/tclBasic.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index f06c029..69f1e98 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.269 2007/09/14 14:58:07 dkf Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.270 2007/09/25 20:27:17 dkf Exp $ */ #include "tclInt.h" @@ -472,12 +472,12 @@ Tcl_CreateInterp(void) /* * Initialise the tables for variable traces and searches *before* * creating the global ns - so that the trace on errorInfo can be - * recorded. + * recorded. */ - + Tcl_InitHashTable(&iPtr->varTraces, TCL_ONE_WORD_KEYS); Tcl_InitHashTable(&iPtr->varSearches, TCL_ONE_WORD_KEYS); - + iPtr->globalNsPtr = NULL; /* Force creation of global ns below */ iPtr->globalNsPtr = (Namespace *) Tcl_CreateNamespace(interp, "", (ClientData) NULL, NULL); @@ -656,6 +656,13 @@ Tcl_CreateInterp(void) Tcl_CreateObjCommand(interp, "::tcl::Bgerror", TclDefaultBgErrorHandlerObjCmd, NULL, NULL); + /* + * Create an unsupported command for debugging bytecode. + */ + + Tcl_CreateObjCommand(interp, "::tcl::unsupported::disassemble", + Tcl_DisassembleObjCmd, NULL, NULL); + #ifdef USE_DTRACE /* * Register the tcl::dtrace command. @@ -3386,7 +3393,7 @@ TclInterpReady( Tcl_ResetResult(interp); Tcl_AppendResult(interp, "attempt to call eval in deleted interpreter", NULL); - Tcl_SetErrorCode(interp, "CORE", "IDELETE", + Tcl_SetErrorCode(interp, "TCL", "IDELETE", "attempt to call eval in deleted interpreter", NULL); return TCL_ERROR; } |