From: Tim Van den Langenbergh <tmt_vdl@gmx.com>
To: guile-user@gnu.org
Subject: Re: trace-calls-to-procedure
Date: Fri, 25 Dec 2020 13:37:46 +0100 [thread overview]
Message-ID: <3855edf1-eb36-2a17-0467-94bc69b1a229@gmx.com> (raw)
In-Reply-To: <CACgrOx+yX6M0oYcVTwu9rKV-M9153v6tWb33SpECX0phFuk+Mw@mail.gmail.com>
[-- Attachment #1.1.1: Type: text/plain, Size: 862 bytes --]
On 25/12/2020 05:51, Tim Meehan wrote:
> I have used ",trace" before and get what it is supposed to do, but I am not
> sure what "trace-calls-to-procedure" is supposed to do ...
>
> ;; Using Guile 3.0.4
> (use-modules (system vm trace))
>
> (define (sqr x)
> (* x x))
>
> (trace-calls-to-procedure sqr)
>
> (sqr 3)
>
> ;; ... and nothing happens ... is something supposed to happen?
>
trace-calls-to-procedure is a low-level trace procedure that returns a
trap that you have to install in the trap state. You can either use the
add-trap! procedure from (use-modules system vm trap-state), or use the
add-trace-at-procedure-call! procedure from the same module.
That said, there seems to be a bug in add-trace-at-procedure-call! which
I'm having a hard time figuring out... c'est la vie.
Vale
-Tim Van den Langenbergh
[-- Attachment #1.1.2: OpenPGP_0xF50AF328D9D1E635.asc --]
[-- Type: application/pgp-keys, Size: 3963 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
next prev parent reply other threads:[~2020-12-25 12:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-25 4:51 trace-calls-to-procedure Tim Meehan
2020-12-25 5:58 ` trace-calls-to-procedure Zelphir Kaltstahl
2020-12-25 8:42 ` trace-calls-to-procedure tomas
2020-12-26 1:23 ` trace-calls-to-procedure Tim Meehan
2020-12-25 12:37 ` Tim Van den Langenbergh [this message]
2020-12-25 14:56 ` trace-calls-to-procedure Tim Van den Langenbergh
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=3855edf1-eb36-2a17-0467-94bc69b1a229@gmx.com \
--to=tmt_vdl@gmx.com \
--cc=guile-user@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).