[gambit-list] limiting trace

lowly coder lowlycoder at huoyanjinjing.com
Sat Feb 21 20:53:23 EST 2009


Okay, so I have what I need, in the sense that I can write an alternative
function that gets called during 'trace', as seen in attached "trace.scm"

Here, however, are things I don't get:

1) in adition to proc & args, can I also get the current stack frame?

2) looking at "broken.scm" and "works.scm" -- I just copied/pasted the
make-default-entry-hook from lib/_repl.scm -- why does one of them work for
tracing and the other does not?

Thanks!

On Fri, Feb 20, 2009 at 9:08 PM, Marc Feeley <feeley at iro.umontreal.ca>wrote:

>
> On 20-Feb-09, at 11:44 PM, lowly coder wrote:
>
>  So I'm looking more in lib/_repl.scm, in particular at:
>>
>> (define-prim (##interp-procedure-default-entry-hook proc)
>>  (let ((hook (##interp-procedure-entry-hook proc)))
>>    (if (and hook
>>             (##closure? hook)
>>             (##eq? (##subprocedure-parent (##closure-code hook))
>>                    ##make-default-entry-hook))
>>      hook
>>      #f)))
>>
>>
>> and I'm wondering two things:
>>
>> 1) in trace, where is the pp / display / write
>>
>> 2) after the proc is setup by ##interp-procedure-default-entry-hook, where
>> in the interpreter is proc called?
>>
>
> I won't spoil your fun... in only 40 minutes you've learned a lot about
> Gambit!  I'll give you the answer tomorrow night if you can't solve it
> yourself...
>
> Marc
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20090221/dead63db/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: trace.scm
Type: text/x-scheme
Size: 983 bytes
Desc: not available
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20090221/dead63db/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: works.scm
Type: text/x-scheme
Size: 1327 bytes
Desc: not available
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20090221/dead63db/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: broken.scm
Type: text/x-scheme
Size: 1330 bytes
Desc: not available
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20090221/dead63db/attachment-0002.bin>


More information about the Gambit-list mailing list