[slime-cvs] CVS slime
CVS User heller
heller at common-lisp.net
Sun Oct 19 20:03:34 UTC 2008
Update of /project/slime/cvsroot/slime
In directory cl-net:/tmp/cvs-serv4440
Modified Files:
ChangeLog slime.el swank-abcl.lisp swank-allegro.lisp
swank-backend.lisp swank-clisp.lisp swank-corman.lisp
swank-lispworks.lisp swank-openmcl.lisp swank.lisp
Log Message:
* swank.lisp (frame-locals-and-catch-tags): New function.
Fetch locals and catch tags with a single RPC.
* slime.el (sldb-frame-details): Use it.
* swank-backend.lisp (frame-catch-tags): Provide a default
implementation. Delete the dummy defs in various backends.
--- /project/slime/cvsroot/slime/ChangeLog 2008/10/19 20:03:21 1.1565
+++ /project/slime/cvsroot/slime/ChangeLog 2008/10/19 20:03:34 1.1566
@@ -1,3 +1,13 @@
+2008-10-19 Helmut Eller <heller at common-lisp.net>
+
+ * swank.lisp (frame-locals-and-catch-tags): New function.
+ Fetch locals and catch tags with a single RPC.
+
+ * slime.el (sldb-frame-details): Use it.
+
+ * swank-backend.lisp (frame-catch-tags): Provide a default
+ implementation. Delete the dummy defs in various backends.
+
2008-10-19 Mark Evenson <evenson at panix.com>
* swank-abcl.lisp (handle-compiler-warning): Report source
--- /project/slime/cvsroot/slime/slime.el 2008/10/17 21:26:53 1.1049
+++ /project/slime/cvsroot/slime/slime.el 2008/10/19 20:03:34 1.1050
@@ -7173,13 +7173,13 @@
(defun sldb-frame-details ()
;; Return a list (START END FRAME LOCALS CATCHES) for frame at point.
(let* ((frame (get-text-property (point) 'frame))
- (num (car frame))
- (catches (sldb-catch-tags num))
- (locals (sldb-frame-locals num)))
+ (num (car frame)))
(destructuring-bind (start end) (sldb-frame-region)
- (list start end frame locals catches))))
+ (list* start end frame
+ (slime-eval `(swank:frame-locals-and-catch-tags ,num))))))
-(defvar sldb-insert-frame-variable-value-function 'sldb-insert-frame-variable-value)
+(defvar sldb-insert-frame-variable-value-function
+ 'sldb-insert-frame-variable-value)
(defun sldb-insert-locals (vars prefix frame)
"Insert VARS and add PREFIX at the beginning of each inserted line.
@@ -7226,12 +7226,6 @@
(first sldb-condition)
(second sldb-condition))))
-(defun sldb-frame-locals (frame)
- (slime-eval `(swank:frame-locals-for-emacs ,frame)))
-
-(defun sldb-catch-tags (frame)
- (slime-eval `(swank:frame-catch-tags-for-emacs ,frame)))
-
;;;;;; SLDB eval and inspect
--- /project/slime/cvsroot/slime/swank-abcl.lisp 2008/10/19 20:03:22 1.59
+++ /project/slime/cvsroot/slime/swank-abcl.lisp 2008/10/19 20:03:34 1.60
@@ -262,10 +262,6 @@
(defimplementation frame-locals (index)
`(,(list :name "??" :id 0 :value "??")))
-(defimplementation frame-catch-tags (index)
- (declare (ignore index))
- nil)
-
#+nil
(defimplementation disassemble-frame (index)
(disassemble (debugger:frame-function (nth-frame index))))
--- /project/slime/cvsroot/slime/swank-allegro.lisp 2008/10/17 21:26:53 1.117
+++ /project/slime/cvsroot/slime/swank-allegro.lisp 2008/10/19 20:03:34 1.118
@@ -178,10 +178,6 @@
(defimplementation frame-var-value (frame var)
(let ((frame (nth-frame frame)))
(debugger:frame-var-value frame var)))
-
-(defimplementation frame-catch-tags (index)
- (declare (ignore index))
- nil)
(defimplementation disassemble-frame (index)
(disassemble (debugger:frame-function (nth-frame index))))
--- /project/slime/cvsroot/slime/swank-backend.lisp 2008/10/17 21:27:16 1.158
+++ /project/slime/cvsroot/slime/swank-backend.lisp 2008/10/19 20:03:34 1.159
@@ -670,7 +670,8 @@
(definterface frame-catch-tags (frame-number)
"Return a list of catch tags for being printed in a debugger stack
-frame.")
+frame."
+ '())
(definterface frame-locals (frame-number)
"Return a list of ((&key NAME ID VALUE) ...) where each element of
--- /project/slime/cvsroot/slime/swank-clisp.lisp 2008/10/19 20:03:12 1.83
+++ /project/slime/cvsroot/slime/swank-clisp.lisp 2008/10/19 20:03:34 1.84
@@ -513,10 +513,6 @@
(not (mismatch pattern string :end2 (min (length pattern)
(length string)))))
-(defimplementation frame-catch-tags (index)
- (declare (ignore index))
- nil)
-
(defimplementation return-from-frame (index form)
(sys::return-from-eval-frame (nth-frame index) form))
--- /project/slime/cvsroot/slime/swank-corman.lisp 2008/10/17 21:26:53 1.19
+++ /project/slime/cvsroot/slime/swank-corman.lisp 2008/10/19 20:03:34 1.20
@@ -203,10 +203,6 @@
(let ((cl::*compiler-environment* (get-frame-debug-info frame)))
(eval form))))
-(defimplementation frame-catch-tags (index)
- (declare (ignore index))
- nil)
-
(defimplementation frame-var-value (frame-number var)
(let ((vars (frame-variables (elt *frame-trace* frame-number))))
(when vars
--- /project/slime/cvsroot/slime/swank-lispworks.lisp 2008/10/17 21:26:53 1.121
+++ /project/slime/cvsroot/slime/swank-lispworks.lisp 2008/10/19 20:03:34 1.122
@@ -356,10 +356,6 @@
(declare (ignore _n _s _l))
value)))
-(defimplementation frame-catch-tags (index)
- (declare (ignore index))
- nil)
-
(defimplementation frame-source-location-for-emacs (frame)
(let ((frame (nth-frame frame))
(callee (if (plusp frame) (nth-frame (1- frame)))))
--- /project/slime/cvsroot/slime/swank-openmcl.lisp 2008/10/17 21:26:58 1.143
+++ /project/slime/cvsroot/slime/swank-openmcl.lisp 2008/10/19 20:03:34 1.144
@@ -527,7 +527,7 @@
(return-from frame-locals (nreverse result)))))))))
-#+(or)
+#+(or) ;; Doesn't work well on x86-32
(defimplementation frame-catch-tags (index &aux my-frame)
(block frame-catch-tags
(map-backtrace
@@ -550,8 +550,6 @@
(typep (car tag) 'restart))
`(:restart ,(restart-name (car tag)))))))))))))
-(defimplementation frame-catch-tags (index &aux my-frame) nil)
-
(defimplementation disassemble-frame (the-frame-number)
(let ((function-to-disassemble nil))
(block find-frame
--- /project/slime/cvsroot/slime/swank.lisp 2008/10/17 21:27:16 1.606
+++ /project/slime/cvsroot/slime/swank.lisp 2008/10/19 20:03:34 1.607
@@ -2385,18 +2385,20 @@
(multiple-value-list
(eval-in-frame (wrap-sldb-vars (from-string string)) index)))))
-(defslimefun frame-locals-for-emacs (index)
- "Return a property list ((&key NAME ID VALUE) ...) describing
-the local variables in the frame INDEX."
- (with-bindings *backtrace-printer-bindings*
- (mapcar (lambda (frame-locals)
- (destructuring-bind (&key name id value) frame-locals
- (list :name (prin1-to-string name) :id id
- :value (to-line value))))
- (frame-locals index))))
+(defslimefun frame-locals-and-catch-tags (index)
+ "Return a list (LOCALS TAGS) for vars and catch tags in the frame INDEX.
+LOCALS is a list of the form ((&key NAME ID VALUE) ...).
+TAGS has is a list of strings."
+ (list (frame-locals-for-emacs index)
+ (mapcar #'to-string (frame-catch-tags index))))
-(defslimefun frame-catch-tags-for-emacs (frame-index)
- (mapcar #'to-string (frame-catch-tags frame-index)))
+(defun frame-locals-for-emacs (index)
+ (with-bindings *backtrace-printer-bindings*
+ (loop for var in (frame-locals index)
+ collect (destructuring-bind (&key name id value) var
+ (list :name (prin1-to-string name)
+ :id id
+ :value (to-line value))))))
(defslimefun sldb-disassemble (index)
(with-output-to-string (*standard-output*)
More information about the slime-cvs
mailing list