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
OpenPGP_0xF50AF328D9D1E635.asc
Description: application/pgp-keys
OpenPGP_signature
Description: OpenPGP digital signature