Hello!

Mike Gran <spk...@yahoo.com> writes:

> With the default behavior of 1.9.x, REPL debug and backtrace are broken.

Indeed, it looks like the VM frames are ignored.

Another example:

--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> (letrec ((f (lambda (x) (g x))) (g (lambda (x) (x)))) (f 
(lambda () (make-stack #t))))
$1 = #<stack 6bebc0:ce3ce0>
scheme@(guile-user)> (display-backtrace $1 (current-output-port))
In unknown file:
   ?: 0* [#<vm 7002d0> #<program ce3da0 at <unknown port>:0:0 ()>]
   ?: 1* [make-stack #t #t]
scheme@(guile-user)> (stack-length $1)
$2 = 2
--8<---------------cut here---------------end--------------->8---

as opposed to:

--8<---------------cut here---------------start------------->8---
guile> (letrec ((f (lambda (x) (g x))) (g (lambda (x) (x)))) (f (lambda () 
(make-stack #t))))
$1 = #<stack 7f17ea928420:7f17ea8008a0>
guile> (display-backtrace $1 (current-output-port))
In unknown file:
   ?: 0* [primitive-eval (letrec ((f #) (g #)) (f (lambda () #)))]
   1: 1* (letrec ((f (lambda # #)) (g (lambda # #))) (f (lambda () (make-stack 
#t))))
   1: 2  [f #<procedure #f ()>]
   ...
   1: 3  [gsubr-apply #<primitive-procedure make-stack> #t]
guile> (stack-length $1)
$2 = 4
--8<---------------cut here---------------end--------------->8---

I’ll try to investigate this.

Ludo’.



Reply via email to