Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2002-01-17
01:42 • Closed ticket [219200ffff]: objectified Tcl_CreateTrace w/ extension plus 7 ... artifact: a09f94ec70 user: hobbs
2001-04-04
03:47 • Ticket [219200ffff]: 1 change artifact: d827171a51 user: dgp
2000-12-03
00:50 • Ticket [219200ffff]: 5 changes artifact: 6646cd46a1 user: dkf
2000-10-26
05:03 • New ticket [219200ffff]. artifact: 0b6d42fbc7 user: nobody

objectified Tcl_CreateTrace w/ extension

Closed / Fixed219200ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 25 years ago
Descriptionplain2000-10-26 05:03:29
OriginalBugID: 2855 RFE
Version: 8.2
SubmitDate: '1999-09-21'
LastModified: '2000-04-03'
Severity: LOW
Status: Assigned
Submitter: techsupp
ChangedBy: hobbs
OS: Windows NT
OSVersion: 4.0sp5
Machine: X86
FixedDate: '2000-10-25'
ClosedDate: '2000-10-25'


Name:
vince darley

Extensions:
none

Comments:
ftp://ftp.ucsd.edu/pub/alpha/tcl/extensions/trace.c
    
    contains the C code to a sample extension which uses the new API to
    create a new command 'tracecommand' which can be used to debug Tcl
    code quite nicely.  The extension may be freely used/distributed etc.

DesiredBehavior:
Enhance Tcl_CreateTrace for:
    
    (i) Tcl_Obj API for greater efficiency in command tracing
    (ii) Only trigger command traces inside a given command/proc
         (very useful to debug that command/proc)
    (iii) Trigger command traces both before and after execution,
          so that the results of commands can be traced.
    
    Note that TclX provides 'cmdtrace' which is about the best that
    can be done with Tcl's current API.  But can't do any of the
    above, since Tcl doesn't allow it without my patch.

Patch:
ftp://ftp.ucsd.edu/pub/alpha/tcl/extensions/trace.diff

PatchFiles:
tcl.h
    tcl.decls
    tclBasic.c
    tclParse.c
    tclExecute.c



Should consider the extension as a possible new module as well. 
-- 04/03/2000 hobbs
dkfplain2000-12-03 00:50:42
Implementing this will almost certainly require a TIP as it is an API change.  It will also need documentation and (probably) test suite changes.  But it is probably a good idea to do it anyway; not very much code uses the current interface (I believe, but I may be wrong here!) and the gain in efficiency would be a big bonus.

On a related point, I've got some code for object-sensitive linking of C and Tcl variables, which may well be useful in some applications...
dgp Ticket [219200ffff]: 1 change [History diff]2001-04-04 03:47:36
hobbsplain2002-01-17 01:42:10
Logged In: YES 
user_id=72656

this is in 8.4
Log in (anonymous is fine) to add a comment.