Index: ChangeLog
===================================================================
RCS file: /project/slime/cvsroot/slime/ChangeLog,v
retrieving revision 1.795
diff -u -p -r1.795 ChangeLog
--- ChangeLog	14 Oct 2005 18:51:01 -0000	1.795
+++ ChangeLog	15 Oct 2005 08:10:08 -0000
@@ -1,3 +1,13 @@
+2005-10-15  Gabor Melis  <mega@hotpop.com>
+
+	* swank-backend.lisp (install-debugger-globally): new interface
+	function
+
+	* swank.lisp (install-debugger): call install-debugger-globally
+
+	* swank-sbcl.lisp (install-debugger-globally): set
+	sb-ext:*invoke-debugger-hook* too
+
 2005-10-15  Douglas Crosher <dcrosher@common-lisp.net>
 
 	* swank-scl.lisp: Support for Scieneer Common Lisp.
Index: swank-backend.lisp
===================================================================
RCS file: /project/slime/cvsroot/slime/swank-backend.lisp,v
retrieving revision 1.91
diff -u -p -r1.91 swank-backend.lisp
--- swank-backend.lisp	14 Oct 2005 18:14:19 -0000	1.91
+++ swank-backend.lisp	15 Oct 2005 08:10:10 -0000
@@ -430,6 +430,12 @@ Return a documentation string, or NIL if
 
 ;;;; Debugging
 
+(definterface install-debugger-globally (function)
+  "Install FUNCTION as the debugger for all threads/processes. This
+usually involves setting *DEBUGGER-HOOK* and, if the implementation
+permits, hooking into BREAK as well."
+  (setq *debugger-hook* function))
+
 (definterface call-with-debugging-environment (debugger-loop-fn)
    "Call DEBUGGER-LOOP-FN in a suitable debugging environment.
 
Index: swank-sbcl.lisp
===================================================================
RCS file: /project/slime/cvsroot/slime/swank-sbcl.lisp,v
retrieving revision 1.146
diff -u -p -r1.146 swank-sbcl.lisp
--- swank-sbcl.lisp	22 Sep 2005 20:20:43 -0000	1.146
+++ swank-sbcl.lisp	15 Oct 2005 08:10:12 -0000
@@ -618,6 +618,10 @@ Return a list of the form (NAME LOCATION
 
 (defvar *sldb-stack-top*)
 
+(defimplementation install-debugger-globally (function)
+  (setq sb-ext:*invoke-debugger-hook* function)
+  (setq *debugger-hook* function))
+
 (defimplementation call-with-debugging-environment (debugger-loop-fn)
   (declare (type function debugger-loop-fn))
   (let* ((*sldb-stack-top* (or sb-debug:*stack-top-hint* (sb-di:top-frame)))
Index: swank.lisp
===================================================================
RCS file: /project/slime/cvsroot/slime/swank.lisp,v
retrieving revision 1.345
diff -u -p -r1.345 swank.lisp
--- swank.lisp	14 Oct 2005 18:05:43 -0000	1.345
+++ swank.lisp	15 Oct 2005 08:10:19 -0000
@@ -2037,7 +2037,7 @@ after Emacs causes a restart to be invok
 (defun install-debugger (connection)
   (declare (ignore connection))
   (when *global-debugger*
-    (setq *debugger-hook* #'swank-debugger-hook)))
+    (install-debugger-globally #'swank-debugger-hook)))
 
 ;;;;; Debugger loop
 ;;;
