Code:<br><br>~/code/irc$ cat trace.scm<br>(define (foo x) x)<br><br>(define (bar) (foo 0))<br><br>(define (test)<br>  (foo 1)<br>  (bar))<br>  <br>(trace foo)<br><br>(test)<br>~/code/irc$ gsi trace.scm<br>| > (foo 1)<br>
| 1<br>| > (foo 0)<br>| 0<br><br><br>Problem:<br><br>Can I control trace where I can say "trace foo, but not when it's called by bar".<br><br>I.e. rather than just saying "trace this function", I would like to be able to say:<br>
<br><br>(trace foo predicate)<br><br>where predicate is a function that takes as input the "stack" frame, and as output creates a #t / #f, which decides whether this particular trace should be printed<br><br><br>
<br>On a side note -- all the cool debugging functions in Gambit -- is this part of the 100K LOC scheme or 50K LOC hand written C? (hoping it's the former)<br>