* scheme-data.texi (Arithmetic): Documented the arithmetic
[bpt/guile.git] / doc / scheme-debug.texi
CommitLineData
38a93523
NJ
1@page
2@node Debugging
3@chapter Internal Debugging Interface
4
5--- The name of this chapter needs to clearly distinguish it
6 from the appendix describing the debugger UI. The intro
7 should have a pointer to the UI appendix.
8
9@c docstring begin (texi-doc-string "guile" "display-error")
10@deffn primitive display-error stack port subr message args rest
11Display an error message to the output port @var{port}.
12@var{stack} is the saved stack for the error, @var{subr} is
13the name of the procedure in which the error occured and
14@var{message} is the actual error message, which may contain
15formatting instructions. These will format the arguments in
16the list @var{args} accordingly. @var{rest} is currently
17ignored.
18@end deffn
19
20@c docstring begin (texi-doc-string "guile" "display-application")
21@deffn primitive display-application frame [port [indent]]
22Display a procedure application @var{frame} to the output port
23@var{port}. @var{indent} specifies the indentation of the
24output.
25@end deffn
26
27@c docstring begin (texi-doc-string "guile" "display-backtrace")
28@deffn primitive display-backtrace stack port [first [depth]]
29Display a backtrace to the output port @var{port}. @var{stack}
30is the stack to take the backtrace from, @var{first} specifies
31where in the stack to start and @var{depth} how much frames
32to display. Both @var{first} and @var{depth} can be @code{#f},
33which means that default values will be used.
34@end deffn
35
36@c docstring begin (texi-doc-string "guile" "backtrace")
37@deffn primitive backtrace
38Display a backtrace of the stack saved by the last error
39to the current output port.
40@end deffn
41
42@c docstring begin (texi-doc-string "guile" "malloc-stats")
43@deffn primitive malloc-stats
44Return an alist ((@var{what} . @var{n}) ...) describing number
45of malloced objects.
46@var{what} is the second argument to @code{scm_must_malloc},
47@var{n} is the number of objects of that type currently
48allocated.
49@end deffn
50
51@c docstring begin (texi-doc-string "guile" "debug-options-interface")
52@deffn primitive debug-options-interface [setting]
53Option interface for the debug options. Instead of using
54this procedure directly, use the procedures @code{debug-enable},
55@code{debug-disable}, @code{debug-set!} and @var{debug-options}.
56@end deffn
57
58@c docstring begin (texi-doc-string "guile" "with-traps")
59@deffn primitive with-traps thunk
60Call @var{thunk} with traps enabled.
61@end deffn
62
63@c docstring begin (texi-doc-string "guile" "memoized?")
64@deffn primitive memoized? obj
65Return @code{#t} if @var{obj} is memoized.
66@end deffn
67
68@c docstring begin (texi-doc-string "guile" "unmemoize")
69@deffn primitive unmemoize m
70Unmemoize the memoized expression @var{m},
71@end deffn
72
73@c docstring begin (texi-doc-string "guile" "memoized-environment")
74@deffn primitive memoized-environment m
75Return the environment of the memoized expression @var{m}.
76@end deffn
77
78@c docstring begin (texi-doc-string "guile" "procedure-name")
79@deffn primitive procedure-name proc
80Return the name of the procedure @var{proc}
81@end deffn
82
83@c docstring begin (texi-doc-string "guile" "procedure-source")
84@deffn primitive procedure-source proc
85Return the source of the procedure @var{proc}.
86@end deffn
87
88@c docstring begin (texi-doc-string "guile" "procedure-environment")
89@deffn primitive procedure-environment proc
90Return the environment of the procedure @var{proc}.
91@end deffn
92
93@c docstring begin (texi-doc-string "guile" "debug-object?")
94@deffn primitive debug-object? obj
95Return @code{#t} if @var{obj} is a debug object.
96@end deffn
97
98@c docstring begin (texi-doc-string "guile" "frame-arguments")
99@deffn primitive frame-arguments frame
100Return the arguments of @var{frame}.
101@end deffn
102
103@c docstring begin (texi-doc-string "guile" "frame-evaluating-args?")
104@deffn primitive frame-evaluating-args? frame
105Return @code{#t} if @var{frame} contains evaluated arguments.
106@end deffn
107
108@c docstring begin (texi-doc-string "guile" "frame-next")
109@deffn primitive frame-next frame
110Return the next frame of @var{frame}, or @code{#f} if
111@var{frame} is the last frame in its stack.
112@end deffn
113
114@c docstring begin (texi-doc-string "guile" "frame-number")
115@deffn primitive frame-number frame
116Return the frame number of @var{frame}.
117@end deffn
118
119@c docstring begin (texi-doc-string "guile" "frame-overflow?")
120@deffn primitive frame-overflow? frame
121Return @code{#t} if @var{frame} is an overflow frame.
122@end deffn
123
124@c docstring begin (texi-doc-string "guile" "frame-previous")
125@deffn primitive frame-previous frame
126Return the previous frame of @var{frame}, or @code{#f} if
127@var{frame} is the first frame in its stack.
128@end deffn
129
130@c docstring begin (texi-doc-string "guile" "frame-procedure")
131@deffn primitive frame-procedure frame
132Return the procedure for @var{frame}, or @code{#f} if no
133procedure is associated with @var{frame}.
134@end deffn
135
136@c docstring begin (texi-doc-string "guile" "frame-procedure?")
137@deffn primitive frame-procedure? frame
138Return @code{#t} if a procedure is associated with @var{frame}.
139@end deffn
140
141@c docstring begin (texi-doc-string "guile" "frame-real?")
142@deffn primitive frame-real? frame
143Return @code{#t} if @var{frame} is a real frame.
144@end deffn
145
146@c docstring begin (texi-doc-string "guile" "frame-source")
147@deffn primitive frame-source frame
148Return the source of @var{frame}.
149@end deffn
150
151@c docstring begin (texi-doc-string "guile" "frame?")
152@deffn primitive frame? obj
153Return @code{#t} if @var{obj} is a stack frame.
154@end deffn
155
156@c docstring begin (texi-doc-string "guile" "last-stack-frame")
157@deffn primitive last-stack-frame obj
158Return a stack which consists of a single frame, which is the
159last stack frame for @var{obj}. @var{obj} must be either a
160debug object or a continuation.
161@end deffn
162
163@c docstring begin (texi-doc-string "guile" "make-stack")
164@deffn primitive make-stack obj . args
165Create a new stack. If @var{obj} is @code{#t}, the current
166evaluation stack is used for creating the stack frames,
167otherwise the frames are taken from @var{obj} (which must be
168either a debug object or a continuation).
169@var{args} must be a list if integers and specifies how the
170resulting stack will be narrowed.
171@end deffn
172
173@c docstring begin (texi-doc-string "guile" "stack-id")
174@deffn primitive stack-id stack
175Return the identifier given to @var{stack} by @code{start-stack}.
176@end deffn
177
178@c docstring begin (texi-doc-string "guile" "stack-length")
179@deffn primitive stack-length stack
180Return the length of @var{stack}.
181@end deffn
182
183@c docstring begin (texi-doc-string "guile" "stack-ref")
184@deffn primitive stack-ref stack i
185Return the @var{i}'th frame from @var{stack}.
186@end deffn
187
188@c docstring begin (texi-doc-string "guile" "stack?")
189@deffn primitive stack? obj
190Return @code{#t} if @var{obj} is a calling stack.
191@end deffn
192
193
194@c Local Variables:
195@c TeX-master: "guile.texi"
196@c End: