~/test$ gsi test.scm -e "(a)" *** ERROR IN a, "test.scm"@1.23 -- Unbound variable: b ~/test$ gsi test.scm -e "(run)" #f #("/home/x/test/test.scm" 1441792) #("/home/x/test/test.scm" 1048576) #("/home/x/test/test.scm" 786432) #f #((string) 0) #f #f 25 ~/test$ cat test.scm (define (a) (pp (+ 20 b)))
(define (run) (let ((old-handler (current-exception-handler))) (with-exception-handler (lambda (e) (with-exception-handler old-handler (lambda ()
(##continuation-capture (lambda (old-cont) (do ;((cur-frame cont (##continuation-next-frame cur-frame #t))) ((cont old-cont (##continuation-next-frame cont #t))) ((not cont)) (pp (##continuation-locat cont)))
(##continuation-return old-cont 5)))
))) (lambda () (a)))))
Why is it ... that when I print out the continuations by frame, I can't get the data that I want (which ##cmd-b apparently does get, which is: test.scm, line 1, character 23).
This baffles me.
(I'm trying to write a gambit debugger in gambit, teehee)
Thanks!
Afficher les réponses par date