unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Neil Jerram <neil@ossau.uklinux.net>
To: Julian Graham <joolean@gmail.com>
Cc: guile-devel <guile-devel@gnu.org>
Subject: Re: trace examples broken in master
Date: Tue, 15 Sep 2009 22:54:51 +0100	[thread overview]
Message-ID: <87ocpbrhzo.fsf@ossau.uklinux.net> (raw)
In-Reply-To: <87ab1enwe4.fsf@arudy.ossau.uklinux.net> (Neil Jerram's message of "Tue, 01 Sep 2009 23:16:35 +0100")

Neil Jerram <neil@ossau.uklinux.net> writes:

> Julian Graham <joolean@gmail.com> 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.

    Neil


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)
"1.9.2"
scheme@(guile-user)> ,o interp #t
scheme@(guile-user)> (version)
"1.9.2"
scheme@(guile-user)> (define (rev ls)
         (if (null? ls)
             ls
             (append (rev (cdr ls))
                     (list (car ls)))))
scheme@(guile-user)> (use-modules (ice-9 debugging traps) (ice-9 debugging trace))
;;; 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 /home/neil/.cache/guile/ccache/1.9-0.D-LE-4/usr/local/share/guile/1.9/ice-9/debugging/trc.scm.go
;;; compiled /home/neil/.cache/guile/ccache/1.9-0.D-LE-4/usr/local/share/guile/1.9/ice-9/debugging/traps.scm.go
;;; 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 /home/neil/.cache/guile/ccache/1.9-0.D-LE-4/usr/local/share/guile/1.9/ice-9/debugger/state.scm.go
;;; compiling /usr/local/share/guile/1.9/ice-9/debugger/utils.scm
;;; compiled /home/neil/.cache/guile/ccache/1.9-0.D-LE-4/usr/local/share/guile/1.9/ice-9/debugger/utils.scm.go
;;; compiling /usr/local/share/guile/1.9/ice-9/debugging/steps.scm
;;; compiled /home/neil/.cache/guile/ccache/1.9-0.D-LE-4/usr/local/share/guile/1.9/ice-9/debugging/steps.scm.go
;;; compiled /home/neil/.cache/guile/ccache/1.9-0.D-LE-4/usr/local/share/guile/1.9/ice-9/debugger/commands.scm.go
;;; compiled /home/neil/.cache/guile/ccache/1.9-0.D-LE-4/usr/local/share/guile/1.9/ice-9/debugger/command-loop.scm.go
;;; compiled /home/neil/.cache/guile/ccache/1.9-0.D-LE-4/usr/local/share/guile/1.9/ice-9/debugging/trace.scm.go
scheme@(guile-user)> (define t1 (make <procedure-trap>
                    #:procedure rev
                    #:behaviour (list trace-trap
                                      trace-at-exit)))
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: =>(#@if (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)
scheme@(guile-user)> 




  reply	other threads:[~2009-09-15 21:54 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-09 19:22 trace examples broken in master Julian Graham
2009-07-14  8:07 ` Neil Jerram
2009-07-23 21:42   ` Andy Wingo
2009-08-14 17:00     ` Neil Jerram
2009-08-14 17:21       ` Julian Graham
2009-08-30 10:07   ` Neil Jerram
2009-08-30 15:10     ` Julian Graham
2009-09-01 22:16       ` Neil Jerram
2009-09-15 21:54         ` Neil Jerram [this message]
2009-09-16  0:55           ` Neil Jerram
2009-09-22 14:28           ` Julian Graham
2009-09-22 19:57             ` Neil Jerram
2009-09-23  1:34               ` Julian Graham
2009-09-23 20:19                 ` Neil Jerram

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ocpbrhzo.fsf@ossau.uklinux.net \
    --to=neil@ossau.uklinux.net \
    --cc=guile-devel@gnu.org \
    --cc=joolean@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).