1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 19:50:24 +02:00

document tracing traps

* doc/ref/api-debug.texi (Tracing Traps): Document the traps.
This commit is contained in:
Andy Wingo 2010-10-07 22:27:00 +02:00
parent 5db7c0bf4a
commit 90729e7105

View file

@ -1101,13 +1101,35 @@ trace: (facti 24 0)
trace: 24 trace: 24
@end lisp @end lisp
@deffn {Scheme Procedure} trace-calls-to-procedure proc #:key (width 80) (vm (the-vm)) (prefix "trace: ")) The low-level traps below (@pxref{Low-Level Traps}) share some common
options:
@table @code
@item #:width
The maximum width of trace output. Trace printouts will try not to
exceed this column, but for highly nested procedure calls, it may be
unavoidable. Defaults to 80.
@item #:vm
The VM on which to add the traps. Defaults to the current thread's VM.
@item #:prefix
A string to print out before each trace line. As seen above in the
examples, defaults to @code{"trace: "}.
@end table
@deffn {Scheme Procedure} trace-calls-to-procedure proc @
[#:width] [#:vm] [#:prefix]
Print a trace at applications of and returns from @var{proc}.
@end deffn @end deffn
@deffn {Scheme Procedure} trace-calls-in-procedure proc #:key (width 80) (vm (the-vm)) (prefix "trace: ")) @deffn {Scheme Procedure} trace-calls-in-procedure proc @
[#:width] [#:vm] [#:prefix]
Print a trace at all applications and returns within the dynamic extent
of calls to @var{proc}.
@end deffn @end deffn
@deffn {Scheme Procedure} trace-instructions-in-procedure proc #:key (width 80) (vm (the-vm)) @deffn {Scheme Procedure} trace-instructions-in-procedure proc [#:width] [#:vm]
Print a trace at all instructions executed in the dynamic extent of
calls to @var{proc}.
@end deffn @end deffn
In addition, Guile defines a procedure to call a thunk, tracing all In addition, Guile defines a procedure to call a thunk, tracing all