|
2002-01-17
| ||
| 01:45 | • Closed ticket [219241ffff]: add trace command command plus 7 other changes artifact: 9027c9d0eb user: hobbs | |
|
2001-04-04
| ||
| 04:24 | • Ticket [219241ffff]: 1 change artifact: 1e0d17f8a6 user: dgp | |
|
2001-02-19
| ||
| 17:02 | • Ticket [219241ffff]: 1 change artifact: 66d5c3bee1 user: dkf | |
|
2001-02-15
| ||
| 23:30 | • Ticket [219241ffff]: 1 change artifact: fdaaa8f7d4 user: dkf | |
|
2001-02-07
| ||
| 23:04 | • Ticket [219241ffff]: 1 change artifact: dc820ed6b9 user: dkf | |
|
2001-01-31
| ||
| 01:42 | • Ticket [219241ffff]: 4 changes artifact: 3b45e89bf9 user: vincentdarley | |
|
2001-01-16
| ||
| 21:40 | • Ticket [219241ffff]: 4 changes artifact: 8a0724fcef user: dkf | |
|
2000-12-03
| ||
| 00:35 | • Ticket [219241ffff]: 4 changes artifact: a4862dcb74 user: dkf | |
|
2000-11-08
| ||
| 18:11 | • Ticket [219241ffff]: 1 change artifact: 1290a36851 user: dkf | |
|
2000-10-26
| ||
| 05:04 | • New ticket [219241ffff]. artifact: 776b12fa4d user: nobody | |
add [trace command] command
Closed / Fixed219241ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 25 years ago
Descriptionplain2000-10-26 05:04:04
OriginalBugID: 5048 RFE
Version: 8.3
SubmitDate: '2000-04-12'
LastModified: '2000-08-24'
Severity: LOW
Status: Assigned
Submitter: ericm
ChangedBy: ericm
RelatedBugIDs: 5967
OS: All
FixedDate: '2000-10-25'
FixedInVersion: 8.4a2
ClosedDate: '2000-10-25'
It would be great to be able to trace commands the same way we do variables.
For example, we could do command call counts with this:
trace command myCommand execute myHandler
proc myHandler {args} {
...
}
This should also allow us to trace creation and deletion of commands:
trace command myCommand create ...
trace command myCommand delete ...
The second of these in particular is important for megawidget support. Consider the typical megawidget setup, which creates a frame .f, then renames the frame proc to .f:real, so that it can alias the .f command to the megawidget widget proc. Now if the user does [rename .f {}], this does not really clean up the megawidget (unlike a true widget, where renaming the widget command deletes the widget). If we could trace the deletion, however, we could properly clean up in this case.
- eric
With the patch from Vince Darley (bug: 5967), we can trace rename and delete for commands. Execution and creation are still pending; of these, creation seems unlikely to happen, as it doesn't really seem useful.
The particular implemention of trace command execution is still undetermined.
Eric Melski The Other Tcl Guy
ericm at ajubasolutions.com Ajuba Solutions
-- 08/24/2000 ericm
dkf Ticket [219241ffff]: 1 change
[History diff]2000-11-08 18:11:08
dkfplain2000-12-03 00:35:33
Isn't there some kind of command tracing in 8.4 now?
dkfplain2001-01-16 21:40:40
We've got command renaming and deletion traces. Creation is a little difficult (without a structure instance to attach the info to, how is record of the trace to be called going to retained?) and there are issues with execution which make me a little unhappy (like what happens if you set an execution trace to call the command being executed.) You can also trace *procedure* execution by rewriting the procedure body... You can hack a sort-of replacement for command creation traces by creating another command with the name and then watching for that dummy command to be deleted. Which isn't perfect (think auto-loading of commands) but probably good enough.
vincentdarleyplain2001-01-31 01:42:44
The issue dkf raises of 'what happens if you set an execution trace to call the command being executed' is easy to solve. In the same way as: (i) while a variable is being traced, further traces on that variable are not fired, and (ii) while a command-delete trace is firing further command-delete traces on that command will not fire, and (iii) while a command-rename trace is firing, further command-rename traces on that command will not fire). The simple solution is that while command-execution traces for a given proc/cmd are firing, further execution traces on the command will not be triggered. The code for all of this actually already exists and works.
dkf Ticket [219241ffff]: 1 change
[History diff]2001-02-07 23:04:22
dkf Ticket [219241ffff]: 1 change
[History diff]2001-02-15 23:30:33
dkf Ticket [219241ffff]: 1 change
[History diff]2001-02-19 17:02:53
dgp Ticket [219241ffff]: 1 change
[History diff]2001-04-04 04:24:33
hobbsplain2002-01-17 01:45:04
Logged In: YES user_id=72656 This is in 8.4.
Log in (anonymous is fine) to add a comment.