THIS COMMENT FILE IS STORED ON DEBUG.COM STORED ON: DEBUG.VLI AUTHOR: Unknown (comments by P. Mennen - unreliable) The routines in this file can be loaded by: (INPUT DEBUG) The resources used when this file is loaded are: Atoms = 157 Lists = 355 when this file has been loaded, you may type: (DEBUG) to hook the debugger to the evaluator. when this is done the execution of the next expression can be traced by the use of these debugging commands: "A" ADVANCE advance step by step thru the evaluation of the current expression " " SKIP skip the tracing of the current expression "P" PRINT print the current expression "B" BREAK read a break-point expression from the terminal. continue the evaluation of the expression until the break-point function is encountered "L" LEVEL read a break-point level from the terminal. continue the evaluation of the expression until the given level is reached. "H" HISTORY print the history of the pending evaluations. "E" EVALUATE read and evaluate an expression (this is a toplevel loop, which has no effect on the current debugging session. -CMD- this function accepts one of the 7 debugging commands from the user and performs the requested action .TYI read a character from the keyboard .IF if it is upper case convert it to lower case .TERPRI (EVALUATE) toplevel loop .TERPRI (ADVANCE) advance step by step .TERPRI (SKIP) dont step thru this expression .TERPRI (PRINT) print the current expression .SETQ (BREAK) read a breakpoint function, set STEP to free-run mode .SETQ (LEVEL) read a breakpoint level, set STEP to free-run mode .LET (HISTORY) print the history of the pending evaluations .T if illegal command, ask for another one TPRINT print the expressions in the argument list, and prompt the user for a command EV* the hook function. if STEP is nil, we deepen to search for break-points (i.e. free run mode). if STEP is true, we step once and read another command (i.e. single-step mode). -H- contains the list of pending evaluations EV* contains the break-point function -LVL- contains the break-point level .NULL if we are in free run mode .EQ and the breakpoint is satisfied .STEP then switch to single-step mode .INCR advance the current level number .IFN if we are in free-run, do one evaluation in the user program .-LVL- if we are in single step, first set line position, .LET and print current level and expression .SETQ then read and execute a command .OR if we are in free-run, and the current level is equal to the breakpoint level, then switch to single-step mode .IFN if we are in single-step, print the result of the evaluation and ask for the next command .NEXTL remove the expression from the history list .DECR decrement the current level .-V- and return the result of the user evaluation -LVL- the formater. positions the output according to the current level .IF dont indent beyond column 30 DEBUG the spear. once this function is executed, you are hooked. you can use a control-c to get unhooked. LET this macro allows you to use the temporary binding characteristics of the lambda function, without the awkwardness of the lambda functon for this purpose. the form of the let function is: (LET ((A1 B1) (A2 B2) ... (An Bn)) (S1 S2 ... Sj) which is expended by the macro into: ((LAMBDA (A1 A2 ... An) S1 S2 ... Sj) (B1 B2 ... Bn)) thus the effect of the let function is: temporarily bind B1 to A1, ... Bn to An then evaluate (PROGN S1 S2 ... Sj), then return A1,... An to their previous bindings SVDEBUG save all the functions of the debugger SVDEBUG this routine saves all of the routines on this file (DEBUG.VLI)