From: Adriano Peluso <randomlooser@riseup.net>
To: 48412@debbugs.gnu.org
Subject: bug#48412: tracepointing and backtracing in the REPL sometime hang
Date: Fri, 14 May 2021 09:02:14 +0200 [thread overview]
Message-ID: <4b37551977861fc4d2214dce713c6ff84763ddc8.camel@riseup.net> (raw)
in Guile 3.0.5 installed with Guix (as a package manager on top of
Ubuntu)
In a file I have this simple procedure
(define (f n)
(if (< n 3)
n
(+ (f (- n 1))
(* 2 (f (- n 2)))
(* 3 (f (- n 3))))))
it's a variation of the one calculating the Fibonacci numbers, from an
exercise of the SICP (1.11)
At the REPL, I load the file normally
scheme@(guile-user)> (load "1.11.scm")
Now, I can trace this procedure
scheme@(guile-user)> ,trace (f 4)
trace: | (f 4)
trace: | | (f 3)
trace: | | | (f 2)
trace: | | | 2
trace: | | | (f 1)
trace: | | | 1
trace: | | | (f 0)
trace: | | | 0
trace: | | 4
trace: | | (f 2)
trace: | | 2
trace: | | (f 1)
trace: | | 1
trace: | 11
But I can't tracepoint it
scheme@(guile-user)> ,tp f
Trap 0: Tracepoint at #<procedure f (n)>.
scheme@(guile-user)> (f 4)
Trap 0: (f 4)
Trap 0: | (f 3)
Trap 0: | | (f 2)
ice-9/boot-9.scm:1669:16: In procedure raise-exception:
Wrong number of arguments to #<procedure return-handler (frame depth
values)>
Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]>
and now I can't even print a backtrace
scheme@(guile-user)> (f 4)
Trap 0: (f 4)
Trap 0: | (f 3)
Trap 0: | | (f 2)
ice-9/boot-9.scm:1669:16: In procedure raise-exception:
Wrong number of arguments to #<procedure return-handler (frame depth
values)>
Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]> ,bt
In /home/adriano/Documenti/SICP/1.11.scm:
64:9 4 (f 4)
64:9 3 (f 3)
While executing meta-command:
In procedure frame-local-ref: Argument 2 out of range: 1
scheme@(guile-user) [1]>
and now I can't even trace no more
scheme@(guile-user) [1]> ,q
scheme@(guile-user)> ,trace (f 4)
While executing meta-command:
Wrong number of arguments to #<procedure return-handler (frame depth
values)>
scheme@(guile-user)>
next reply other threads:[~2021-05-14 7:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-14 7:02 Adriano Peluso [this message]
2021-05-14 9:13 ` bug#48412: duplicate ? Adriano Peluso
2021-05-16 7:09 ` Adriano Peluso
2021-05-19 19:34 ` lloda
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=4b37551977861fc4d2214dce713c6ff84763ddc8.camel@riseup.net \
--to=randomlooser@riseup.net \
--cc=48412@debbugs.gnu.org \
/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).