Page 1 of 1

backtracing with clozure

PostPosted: Tue Apr 29, 2014 9:45 am
by CharlieChan
Hello!
I'm a beginning Lisp enthusiast and i want to use Clozure CL.
I have a problem with backtracing with Clozure.
On the Clozure Homepage there is stated:"Excellent debugging facilities. The names of all local variables are available in a backtrace."
When i take following program:

(defun fac ( n ) (let (( bolt 0))(if (> n 1) (* n (fac (- n 1))) (/ 1 bolt))))
( fac 4)
:b
(:LOCAL bolt 0)
(:LOCAL bolt 1)
(:LOCAL bolt 2)
(:LOCAL bolt 3)

and i want to backtrace it i get following results:

Welcome to Clozure Common Lisp Version 1.9-r15764 (WindowsX8632)!
? FAC
? > Error: DIVISION-BY-ZERO detected
> performing / on (1 0)
> While executing: CCL::%FIXNUM-TRUNCATE, in process listener(1).
> Type :POP to abort, :R for a list of available restarts.
> Type :? for other options.
1 > *(20B9CDC) : 0 (%FIXNUM-TRUNCATE ???) 33
(20B9D18) : 1 (FAC 2) 119
(20B9D24) : 2 (FAC 3) 119
(20B9D30) : 3 (FAC 4) 119
(20B9D3C) : 4 (CALL-CHECK-REGS FAC 4) 247
(20B9D58) : 5 (TOPLEVEL-EVAL (FAC 4) NIL) 711
(20B9D98) : 6 (READ-LOOP :INPUT-STREAM #<SYNONYM-STREAM to *TERMINAL-IO* #xC368036> :OUTPUT-STREAM #<SYNONYM-STREAM to *TERMINAL-IO* #xC367E36> :BREAK-LEVEL 0 :PROMPT-FUNCTION #<Compiled-function (:INTERNAL CCL::READ-LOOP) (Non-Global) #x44A5516>) 2039
(20B9EBC) : 7 (RUN-READ-LOOP :BREAK-LEVEL 0) 183
(20B9ED0) : 8 (TOPLEVEL-LOOP) 71
(20B9ED8) : 9 (FUNCALL #'#<(:INTERNAL (TOPLEVEL-FUNCTION (CCL::LISP-DEVELOPMENT-SYSTEM T)))>) 71
(20B9EE8) : 10 (FUNCALL #'#<(:INTERNAL CCL::MAKE-MCL-LISTENER-PROCESS)>) 559
(20B9F34) : 11 (RUN-PROCESS-INITIAL-FORM #<TTY-LISTENER listener(1) [Active] #xC366266> (#<COMPILED-LEXICAL-CLOSURE # #xC365D8E>)) 639
(20B9F78) : 12 (FUNCALL #'#<(:INTERNAL (CCL::%PROCESS-PRESET-INTERNAL (PROCESS)))> #<TTY-LISTENER listener(1) [Active] #xC366266> (#<COMPILED-LEXICAL-CLOSURE # #xC365D8E>)) 519
(20B9FCC) : 13 (FUNCALL #'#<(:INTERNAL CCL::THREAD-MAKE-STARTUP-FUNCTION)>) 255
1 > ;; Can't determine value of BOLT in frame 0.
1 > ;; Can't determine value of BOLT in frame 1.
1 > ;; Can't determine value of BOLT in frame 2.
1 > ;; Can't determine value of BOLT in frame 3.
1 >

How do i get the values of local variables?
Thanks for replies!