Possible bug in the debugger

View: New views
2 Messages — Rating Filter:   Alert me  

Possible bug in the debugger

by Panagiotis Koutsourakis :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello all,

I recently started using the 1.9 line of development of guile and I
think I found a bug in the debugger. I am not sure if this or
bug-guile is the correct list to report this, but I guess that since
the 1.9 line is still in alpha it fits better here.

In one sentence, when I use "info frame" in the debugger I get an
Internal debugger error.

The bug exists in the most recent commit I compiled from the git
sources: b1f6293e98768f1efedde848520812fc97dea294

The machine I am testing has GNU/Linux installed, specifically Ubuntu.

uname -a gives me:
Linux megababasse 2.6.27-14-generic #1 SMP Fri Jul 24 23:49:25 UTC
2009 x86_64 GNU/Linux

The source compiles without problems and passes all tests.

To reproduce do the following:

(define (foo lst) (car lst))
(foo 5)
(debug)
info frame

Sample output from my machine:

$ ./meta/guile

Guile Scheme interpreter 0.5 on Guile 1.9.4
Copyright (C) 2001-2008 Free Software Foundation, Inc.

Enter `,help' for help.
scheme@(guile-user)> (define (foo lst) (car lst))
scheme@(guile-user)> (foo 5)

Backtrace:
In unknown file:
   ?: 0* [#<vm a56150> #<program ffaf00 at <unknown port>:1:0 ()>]
   1: 1* [foo {5}]

ERROR: In procedure vm-debug-engine:
ERROR: Wrong type argument in position 1 (expecting pair): 5
scheme@(guile-user)> (debug)
This is the Guile debugger -- for help, type `help'.
There are 2 frames on the stack.

Frame 1 at unknown source location
        [foo 5]
debug> info frame
Stack frame: 1 (real)
This frame is an application.
The corresponding expression is:
  Internal debugger error:
ERROR: In procedure unmemoize-expr:
ERROR: Wrong type argument in position 1 (expecting memoized code): (9
#f 0 . 18)

If you need any more information I would be happy to provide it.

Best regards,
--
Panagiotis Koutsourakis



Re: Possible bug in the debugger

by Andy Wingo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Panagiotis,

Thanks for trying the 1.9 series :)

On Mon 26 Oct 2009 11:28, Panagiotis Koutsourakis <kutsurak@...> writes:

> scheme@(guile-user)> (debug)
> This is the Guile debugger -- for help, type `help'.
> There are 2 frames on the stack.
>
> Frame 1 at unknown source location
>         [foo 5]
> debug> info frame
> Stack frame: 1 (real)
> This frame is an application.
> The corresponding expression is:
>   Internal debugger error:
> ERROR: In procedure unmemoize-expr:
> ERROR: Wrong type argument in position 1 (expecting memoized code): (9
> #f 0 . 18)

Indeed, the debugger needs to be updated to understand the VM. The
problem is that now we have two kinds of stacks -- the interpreter
stacks and the VM stacks. I'm hoping to fix this situation within the
next couple weeks.

Until then, yes, some brokenness.

Cheers, and let us know how things are going for you.

Andy
--
http://wingolog.org/