[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: trace examples broken in master

From: Neil Jerram
Subject: Re: trace examples broken in master
Date: Tue, 15 Sep 2009 22:54:51 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Neil Jerram <address@hidden> writes:

> Julian Graham <address@hidden> writes:
>>> This should all be fixed in master now.  Can you have a go and let me
>>> know if you still see any problems?
>> Just built from HEAD.  The errors I reported earlier are gone, but I'm
>> still not getting any trace output from the `rev' example in the
>> manual.
> I'm sorry, I didn't actually try running those examples myself, and I
> still haven't done that yet now - but just a thought: did you try with 
>   ,o interp #t
> so as to use the evaluator instead of the compiler + VM ?

It works for me with current Git and `,o interp #t'; full transcript
below.  Note that this is even when all of the debugging infrastructure
modules are auto-compiled; the only code that must _not_ be compiled,
for that example to work, is the `rev' procedure.

There is an unexpected "warning: stack count incorrect!", though.  I'll
look into that.


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

Enter `,help' for help.
scheme@(guile-user)> (version)
scheme@(guile-user)> ,o interp #t
scheme@(guile-user)> (version)
scheme@(guile-user)> (define (rev ls)
         (if (null? ls)
             (append (rev (cdr ls))
                     (list (car ls)))))
scheme@(guile-user)> (use-modules (ice-9 debugging traps) (ice-9 debugging 
;;; note: autocompilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-autocompile argument to disable.
;;; compiling /usr/local/share/guile/1.9/ice-9/debugging/traps.scm
;;; compiling /usr/local/share/guile/1.9/ice-9/debugging/trc.scm
;;; compiled 
;;; compiled 
;;; compiling /usr/local/share/guile/1.9/ice-9/debugging/trace.scm
;;; compiling /usr/local/share/guile/1.9/ice-9/debugger/command-loop.scm
;;; compiling /usr/local/share/guile/1.9/ice-9/debugger/commands.scm
;;; compiling /usr/local/share/guile/1.9/ice-9/debugger/state.scm
;;; compiled 
;;; compiling /usr/local/share/guile/1.9/ice-9/debugger/utils.scm
;;; compiled 
;;; compiling /usr/local/share/guile/1.9/ice-9/debugging/steps.scm
;;; compiled 
;;; compiled 
;;; compiled 
;;; compiled 
scheme@(guile-user)> (define t1 (make <procedure-trap>
                    #:procedure rev
                    #:behaviour (list trace-trap
scheme@(guile-user)> rev
#<procedure rev (#{ls\ 37}#)>
scheme@(guile-user)> (install-trap t1)
scheme@(guile-user)> (rev '(a b c))
|  2: [rev (a b c)]
warning: stack count incorrect!
|  2: =>(address@hidden (null? #{ls\ 37}#) #{ls\ 37}# (append (rev (cdr #{ls\ 
37}#)) (list (car #{ls\ 37}#))))
|  3: [rev (b c)]
|  4: [rev (c)]
|  5: [rev ()]
|  5: =>()
|  4: =>(c)
|  3: =>(c b)
(c b a)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]