[Openmcl-devel] usefull toplevel commands

Marco Baringer mb at bese.it
Mon Mar 17 11:09:54 PST 2003


i'd also like ot know if there are any problems with these, they work
for me but coding them was basically trial and error.

(in-package :ccl)

(define-toplevel-command :break set (n frame value) "Set <n>th item of frame <frame> to <value>"
  (let* ((frame-sp (nth-raw-frame frame *break-frame* *current-stack-group*)))
    (if frame-sp
        (toplevel-print (list (set-nth-value-in-frame frame-sp n *current-stack-group* value)))
        (format *debug-io* "No frame with number ~D~%" frame))))

;;;; this is the one i've found the most usefull since from within
;;;; the inspector you can change the data on the stack
(define-toplevel-command :break iv (n frame) "Inspect the <n>th item of frame <frame>"
  (let* ((frame-sp (nth-raw-frame frame *break-frame* *current-stack-group*)))
    (if frame-sp
        (inspect (nth-value-in-frame frame-sp n *current-stack-group*))
        (format *debug-io* "No frame with number ~D~%" frame))))

(define-toplevel-command :break d (n frame) "Describe the <n>th item of frame number <frame>"
  (let* ((frame-sp (nth-raw-frame frame *break-frame* *current-stack-group*)))
    (if frame-sp
        (describe (nth-value-in-frame frame-sp n *current-stack-group*))
        (format *debug-io* "No frame with number ~D~%" frame))))

-- 
-Marco
Ring the bells that still can ring.
Forget your perfect offering.
There is a crack in everything.
That's how the light gets in.
     -Leonard Cohen


_______________________________________________
Openmcl-devel mailing list
Openmcl-devel at clozure.com
http://clozure.com/cgi-bin/mailman/listinfo/openmcl-devel



More information about the Openmcl-devel mailing list