/[slime]/slime/swank-cmucl.lisp
ViewVC logotype

Diff of /slime/swank-cmucl.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.207 by heller, Thu Jan 8 06:45:29 2009 UTC revision 1.208 by heller, Thu Jan 8 06:45:37 2009 UTC
# Line 1541  A utility for debugging DEBUG-FUNCTION-A Line 1541  A utility for debugging DEBUG-FUNCTION-A
1541    
1542  (defun frame-debug-vars (frame)  (defun frame-debug-vars (frame)
1543    "Return a vector of debug-variables in frame."    "Return a vector of debug-variables in frame."
1544    (di::debug-function-debug-variables (di:frame-debug-function frame)))    (let ((loc (di:frame-code-location frame)))
1545        (remove-if
1546         (lambda (v)
1547           (not (eq (di:debug-variable-validity v loc) :valid)))
1548         (di::debug-function-debug-variables (di:frame-debug-function frame)))))
1549    
1550  (defun debug-var-value (var frame location)  (defun debug-var-value (var frame)
1551    (let ((validity (di:debug-variable-validity var location)))    (let* ((loc (di:frame-code-location frame))
1552             (validity (di:debug-variable-validity var loc)))
1553      (ecase validity      (ecase validity
1554        (:valid (di:debug-variable-value var frame))        (:valid (di:debug-variable-value var frame))
1555        ((:invalid :unknown) (make-symbol (string validity))))))        ((:invalid :unknown) (make-symbol (string validity))))))
1556    
1557  (defimplementation frame-locals (index)  (defimplementation frame-locals (index)
1558    (let* ((frame (nth-frame index))    (let ((frame (nth-frame index)))
1559           (loc (di:frame-code-location frame))      (loop for v across (frame-debug-vars frame)
          (vars (frame-debug-vars frame)))  
     (loop for v across vars  
           when (eq (di:debug-variable-validity v loc) :valid)  
1560            collect (list :name (di:debug-variable-symbol v)            collect (list :name (di:debug-variable-symbol v)
1561                          :id (di:debug-variable-id v)                          :id (di:debug-variable-id v)
1562                          :value (di:debug-variable-valid-value v frame)))))                          :value (debug-var-value v frame)))))
1563    
1564  (defimplementation frame-var-value (frame var)  (defimplementation frame-var-value (frame var)
1565    (let* ((frame (nth-frame frame))    (let* ((frame (nth-frame frame))
1566           (dvar (aref (frame-debug-vars frame) var)))           (dvar (aref (frame-debug-vars frame) var)))
1567      (debug-var-value dvar frame (di:frame-code-location frame))))      (debug-var-value dvar frame)))
1568    
1569  (defimplementation frame-catch-tags (index)  (defimplementation frame-catch-tags (index)
1570    (mapcar #'car (di:frame-catches (nth-frame index))))    (mapcar #'car (di:frame-catches (nth-frame index))))

Legend:
Removed from v.1.207  
changed lines
  Added in v.1.208

  ViewVC Help
Powered by ViewVC 1.1.5