Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

trace doc confusion

0 views
Skip to first unread message

Arnt

unread,
Jul 16, 2007, 5:04:28 AM7/16/07
to
Hi, I'm confused when reading the trace documentation for trace add
execution, specifically by what is highlighted by * below:

enterstep
Invoke command for every Tcl command which is executed inside the
procedure name, just before the actual execution takes place. For
example if we have 'proc foo {} { puts "hello" }', then an enterstep
trace would be invoked just before puts "hello" is executed. *Setting
an enterstep trace on a command will not result in an error and is
simply ignored.*
leavestep
Invoke command for every Tcl command which is executed inside the
procedure name, just after the actual execution takes place. *Setting
a leavestep trace on a command will not result in an error and is
simply ignored.*

What does it mean setting an enterstep/leavestep on a command will be
ignored? The only logical thing I can imagine is that the 'command' in
those parts are meant to be "Tcl Build-In commands", while 'commands'
in the sentences before that mean "Tcl Build-In commands or user-
defined procs", if I understand things correctly?

Arnt

Don Porter

unread,
Jul 16, 2007, 10:39:40 AM7/16/07
to
Arnt wrote:
> Hi, I'm confused when reading the trace documentation for trace add
> execution, specifically by what is highlighted by * below:
>
> enterstep
> Invoke command for every Tcl command which is executed inside the
> procedure name, just before the actual execution takes place. For
> example if we have 'proc foo {} { puts "hello" }', then an enterstep
> trace would be invoked just before puts "hello" is executed. *Setting
> an enterstep trace on a command will not result in an error and is
> simply ignored.*

If we replace "command" with "non-procedure," does it make sense to
you then?

--
| Don Porter Mathematical and Computational Sciences Division |
| donald...@nist.gov Information Technology Laboratory |
| http://math.nist.gov/~DPorter/ NIST |
|______________________________________________________________________|

Roy Terry

unread,
Jul 16, 2007, 11:23:26 AM7/16/07
to
Don Porter wrote:
> Arnt wrote:
>> Hi, I'm confused when reading the trace documentation for trace add
>> execution, specifically by what is highlighted by * below:
>>
>> enterstep
>> Invoke command for every Tcl command which is executed inside the
>> procedure name, just before the actual execution takes place. For
>> example if we have 'proc foo {} { puts "hello" }', then an enterstep
>> trace would be invoked just before puts "hello" is executed. *Setting
>> an enterstep trace on a command will not result in an error and is
>> simply ignored.*
>
> If we replace "command" with "non-procedure," does it make sense to
> you then?
Saying non-procedure helps except the that "command"
is also used in the syntax description to name the user-supplied
script. So we have two competing meanings for the word:

trace add execution name ops command
"command" ==> user supplied script, or "script"

...setting an enterstep trace on a command will not ...
"command" ==> proc like thingy that has no Tcl source; it's likely
written in C or some non-tcl language.

>

Arnt

unread,
Jul 16, 2007, 12:14:18 PM7/16/07
to
On Jul 16, 5:23 pm, Roy Terry <r...@terryhome.org> wrote:

> Saying non-procedure helps except the that "command"
> is also used in the syntax description to name the user-supplied
> script. So we have two competing meanings for the word:
>
> trace add execution name ops command
> "command" ==> user supplied script, or "script"
>
> ...setting an enterstep trace on a command will not ...
> "command" ==> proc like thingy that has no Tcl source; it's likely
> written in C or some non-tcl language.

That is exactly the source of my confusion: command is used 3 times,
in 3 different meanings:
Invoke command for every Tcl command [..]
Setting an enterstep trace on a command will not [..]

So, if I understand this:

trace add execution name ops *script*

Invoke *script* for every Tcl command [..]

Setting an enterstep trace on a command that is not a proc ("Tcl Build-
In commands" or one provided by a compiled extension) will not [..]

Is that correct?

Roy Terry

unread,
Jul 16, 2007, 12:50:17 PM7/16/07
to
In my understanding, yes. It is correct.
>

Darren New

unread,
Jul 16, 2007, 1:54:00 PM7/16/07
to
Roy Terry wrote:
> In my understanding, yes. It is correct.

It's probably a good idea to report this at SourceForge as a
documentation improvement request.

--
Darren New / San Diego, CA, USA (PST)
I bet exercise equipment would be a lot more
expensive if we had evolved from starfish.

Arnt

unread,
Jul 18, 2007, 5:44:08 AM7/18/07
to
On Jul 16, 7:54 pm, Darren New <d...@san.rr.com> wrote:
> It's probably a good idea to report this at SourceForge as a
> documentation improvement request.

I have added it as a bug.
Arnt

0 new messages