~/test$ gsi test.scm -e "(a)"<br>*** ERROR IN a, "test.scm"@1.23 -- Unbound variable: b<br>~/test$ gsi test.scm -e "(run)"<br>#f<br>#("/home/x/test/test.scm" 1441792)<br>#("/home/x/test/test.scm" 1048576)<br>
#("/home/x/test/test.scm" 786432)<br>#f<br>#((string) 0)<br>#f<br>#f<br>25<br>~/test$ cat test.scm<br>(define (a) (pp (+ 20 b)))<br><br><br>(define (run)<br> (let ((old-handler (current-exception-handler)))<br>
(with-exception-handler<br> (lambda (e)<br> (with-exception-handler<br> old-handler<br> (lambda ()<br><br> (##continuation-capture<br> (lambda (old-cont)<br> (do<br> ;((cur-frame cont (##continuation-next-frame cur-frame #t)))<br>
((cont old-cont (##continuation-next-frame cont #t)))<br> ((not cont))<br> (pp (##continuation-locat cont)))<br><br> (##continuation-return old-cont 5)))<br><br> )))<br> (lambda ()<br>
(a)))))<br><br><br>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).<br><br>This baffles me.<br>
<br>(I'm trying to write a gambit debugger in gambit, teehee)<br><br>Thanks!<br>