[slime-cvs] CVS slime
CVS User sboukarev
sboukarev at common-lisp.net
Sun Jan 3 15:58:29 UTC 2010
Update of /project/slime/cvsroot/slime
In directory cl-net:/tmp/cvs-serv9550
Modified Files:
ChangeLog swank-backend.lisp swank-ccl.lisp swank-sbcl.lisp
Log Message:
* contrib/slime-repl.el (sldb-insert-frame-call-to-repl): New function
for inserting a call to a frame into the REPL. Bound to C-y in SLDB.
* swank-backend.lisp (frame-call): New function.
Returns a string representing a call to the entry point of a frame.
* swank-ccl.lisp (frame-call): Implementation of the above.
* swank-sbcl.lisp (frame-call): Ditto.
--- /project/slime/cvsroot/slime/ChangeLog 2010/01/03 15:46:44 1.1951
+++ /project/slime/cvsroot/slime/ChangeLog 2010/01/03 15:58:29 1.1952
@@ -1,3 +1,10 @@
+2010-01-03 Stas Boukarev <stassats at gmail.com>
+
+ * swank-backend.lisp (frame-call): New function.
+ Returns a string representing a call to the entry point of a frame.
+ * swank-ccl.lisp (frame-call): Implementation of the above.
+ * swank-sbcl.lisp (frame-call): Ditto.
+
2010-01-03 Tobias C. Rittweiler <tcr at freebits.de>
* swank.lisp (with-swank-protocol-error-handler): Remove debugging
--- /project/slime/cvsroot/slime/swank-backend.lisp 2009/12/22 09:31:15 1.188
+++ /project/slime/cvsroot/slime/swank-backend.lisp 2010/01/03 15:58:29 1.189
@@ -747,6 +747,9 @@
The return value is the result of evaulating FORM in the
appropriate context.")
+(definterface frame-call (frame-number)
+ "Return a string representing a call to the entry point of a frame.")
+
(definterface return-from-frame (frame-number form)
"Unwind the stack to the frame FRAME-NUMBER and return the value(s)
produced by evaluating FORM in the frame context to its caller.
--- /project/slime/cvsroot/slime/swank-ccl.lisp 2009/11/02 09:20:33 1.12
+++ /project/slime/cvsroot/slime/swank-ccl.lisp 2010/01/03 15:58:29 1.13
@@ -434,10 +434,15 @@
(format stream " ~s" arg)))))
(format stream ")"))))
+(defimplementation frame-call (frame-number)
+ (with-frame (p context) frame-number
+ (with-output-to-string (stream)
+ (print-frame (list :frame p context) stream))))
+
(defun call/frame (frame-number if-found)
(map-backtrace
(lambda (p context)
- (return-from call/frame
+ (return-from call/frame
(funcall if-found p context)))
frame-number))
--- /project/slime/cvsroot/slime/swank-sbcl.lisp 2010/01/03 10:05:05 1.264
+++ /project/slime/cvsroot/slime/swank-sbcl.lisp 2010/01/03 15:58:29 1.265
@@ -1011,6 +1011,19 @@
#+#.(swank-backend::sbcl-with-restart-frame)
(not (null (sb-debug:frame-has-debug-tag-p frame))))
+(defimplementation frame-call (frame-number)
+ (multiple-value-bind (name args)
+ (sb-debug::frame-call (nth-frame frame-number))
+ (with-output-to-string (stream)
+ (pprint-logical-block (stream nil :prefix "(" :suffix ")")
+ (let ((*print-length* nil)
+ (*print-level* nil))
+ (prin1 (sb-debug::ensure-printable-object name) stream))
+ (let ((args (sb-debug::ensure-printable-object args)))
+ (if (listp args)
+ (format stream "~{ ~_~S~}" args)
+ (format stream " ~S" args)))))))
+
;;;; Code-location -> source-location translation
;;; If debug-block info is avaibale, we determine the file position of
More information about the slime-cvs
mailing list