Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2009-12-28
21:18 • Closed ticket [1083288fff]: trace target plus 8 other changes artifact: ec15a890ca user: dkf
2004-12-11
00:29 • New ticket [1083288fff]. artifact: 867cc48184 user: davidw

trace target

Closed / Fixed1083288fffffffffffffffffffffffffffffffffCreated 22 years agoUpdated 17 years ago
Descriptionplain2004-12-11 00:29:22
It would be handy to have a trace target, something
like this:

strace: tclsh
 @LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@};
export @LD_LIBRARY_PATH_VAR@; \
TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export
TCL_LIBRARY; \
strace $(OPTS) ./tclsh $(SCRIPT)

in Makefile.in (pardon the formatting above)  Jeff
comments on the chat that generalizing it would be even
better:

<tclguy> well, the strace thing ... that might be best
as a more general target
<tclguy> like 'make trace TRACE=strace'
<tclguy> because strace is too platform specific, so
it's not good immediately

Which sounds quite sensible.
dkfplain2009-12-28 21:18:05
allow_comments - 1

Not a bad idea. Added to HEAD (not really worth a backport).

Usage:
  make trace-shell SCRIPT=foo.tcl TRACE=strace TRACE_OPTS=...
  make trace-test TRACE=strace TRACE_OPTS=... TESTFLAGS=...

Default for TRACE is strace, default for TRACE_OPTS is empty.
Log in (anonymous is fine) to add a comment.