[slime-cvs] CVS update: slime/swank-backend.lisp

Helmut Eller heller at common-lisp.net
Thu Feb 24 18:09:34 UTC 2005


Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv29263

Modified Files:
	swank-backend.lisp 
Log Message:
(call-with-debugger-hook): New function. Useful if the backend needs
special incantations for BREAK.

(toggle-trace-function): Add a default implementation for simple
symbols.
Date: Thu Feb 24 19:09:33 2005
Author: heller

Index: slime/swank-backend.lisp
diff -u slime/swank-backend.lisp:1.79 slime/swank-backend.lisp:1.80
--- slime/swank-backend.lisp:1.79	Sun Feb 20 21:20:39 2005
+++ slime/swank-backend.lisp	Thu Feb 24 19:09:33 2005
@@ -411,6 +411,13 @@
 For example, this is a reasonable place to compute a backtrace, switch
 to safe reader/printer settings, and so on.")
 
+(definterface call-with-debugger-hook (hook fun)
+  "Call FUN and use HOOK as debugger hook.
+
+HOOK should be called for both BREAK and INVOKE-DEBUGGER."
+  (let ((*debugger-hook* hook))
+    (funcall fun)))
+
 (define-condition sldb-condition (condition)
   ((original-condition
     :initarg :original-condition
@@ -786,8 +793,10 @@
 
 (definterface toggle-trace-function (spec)
   "Trace one function, including (setf name) forms."
-  (declare (ignore spec))
-  "Sorry, function tracing has not yet been implemented on your platform.")
+  (cond ((symbolp spec)
+         (eval `(trace ,spec)))
+        (t 
+         (format nil "Cannot trace fspec: ~S" spec))))
 
 (definterface toggle-trace-generic-function-methods (name)
   "Trace the generic function and all methods of the generic function."
@@ -795,7 +804,8 @@
   "Sorry, generic function tracing has to yet been implemented on your platform.")
 
 (definterface toggle-trace-method (spec)
-  "Trace one method."
+  "Trace one method.
+SPEC is if the form (:defmethod ,NAME , at QUALIFIERS (, at SPECIALIZERS))."
   (declare (ignore spec))
   "Sorry, method tracing has not yet been implemented on your platform.")
 




More information about the slime-cvs mailing list