1
0
mirror of https://github.com/PDP-10/its.git synced 2026-01-13 23:36:30 +00:00
PDP-10.its/doc/teach/ulisp.debug
2018-11-13 09:38:40 +01:00

96 lines
3.3 KiB
Plaintext

Debugging in ULisp KMP 25 April 80
------------------------------------------------------------------------------
Break Loops
A Breakloop is just like the toplevel evaluation loop except it is a temporary
interruption of the evaluation of some other form, and as such occurs in a
context where some bindings from that evaluation may have taken place.
Breakloops may be unconditionally invoked from code by
(break) or (break evaluated-message)
or they may be conditionally invoked by
(break evaluated-message evaluated-condition)
where if the evaluated-condition returns non-(), then the break will occur.
The function recover will become defined in a breakloop and can be used to
return from a breakpoint. With no args, it simply returns (value undefined),
or with one argument it will return that value. #### It may be that
recover will not always work. This is a known bug which will hopefully be
fixed soon. Report instances of it to speed service. ####
When in a breakloop. You will see a prompt like:
[Break Level n]
Lisp->
unless you do (prompt nil), which will of course suppress all prompting.
------------------------------------------------------------------------------
Debug
Debug is a system-provided stack-debugger. It can be used to explicitly
invoke the debugger from a breakpoint by typing (debug) or it can be caused
to activate automatically on an error by doing (backtrace debug). Disabling
of this feature is by (backtrace nodebug).
Debug commands are one character. The following commands are available:
? Gives short help description.
H Offers to document one or all commands.
. Type out current stack frame in abbreviated form.
T Type out current stack frame in normal form, no abbreviation.
P Type out current stack frame in pretty-printed form, no abbreviation.
F Displays all stack frames in abbreviated form.
A Goes to top of stack
U Goes up a stack frame.
D Goes down a stack frame.
Z Goes to bottom of stack
B Gives a breakpoint at current stack frame level.
C Continues from current stack frame by re-evaluating that form.
(Presumably this should be done if you have first done a "B"
and corrected the error or if the error was caused by external
conditions such as the file system which have since been cleared.)
R Returns from the current stack frame by reading an expression from the
terminal and returning the value returned by that expression rather
than anything to do with the frame which had initially been at the
current form on the stack...
Q Quits the debugger. If invoked from the error handler, control returns
to the next higher breakpoint or toplevel read-eval-print loop.
If invoked from (debug), then returns from that invocation.
------------------------------------------------------------------------------
Quit Characters
#### These are likely to change in the very near future ####
Currently Likely to Become Description
--------- ---------------- -----------
Control-B Control-G Quits to toplevel
Control-X Control-X Error, or local, quit
none Control-B Runs a break loop
------------------------------------------------------------------------------
Tracing
#### No trace facility yet exists. One is planned ####
------------------------------------------------------------------------------