Currently breaks things by interrupting the listener process in the inferior lisp.
Here's one way to fix it (in swank-openmcl.lisp)
(defun create-swank-server (port &key (reuse-address t) (announce #'simple-announce-function)) "Create a Swank TCP server on `port'." (let ((server-socket (ccl:make-socket :connect :passive :local-port port :reuse-address reuse-address))) (funcall announce (ccl:local-port server-socket)) (setq ccl::*interactive-abort-process* ;; tell openmcl which process you want to be interrupted when sigint is received (ccl:process-run-function "Swank Request Processor" #'swank-accept-connection server-socket))))
Then add this redefinition
(defun ccl::force-break-in-listener (p) (ccl::process-interrupt p #'(lambda () (ccl::ignoring-without-interrupts (let ((*swank-debugger-stack-frame* nil) (previous-p nil)) (block find-frame (map-backtrace #'(lambda(frame-number p tcr lfun pc) (declare (ignore frame-number tcr pc)) (when (eq (ccl::lfun-name lfun) 'swank::eval-region) (setq *swank-debugger-stack-frame* previous-p) (return-from find-frame)) (setq previous-p p)))) (invoke-debugger) (clear-input *terminal-io*))))))
-Alan
Alan Ruttenberg alanralanr@comcast.net writes:
Currently breaks things by interrupting the listener process in the inferior lisp.
Here's one way to fix it (in swank-openmcl.lisp)
I added the code to the CVS version, but placed it in comments, because I cannot test it with a current OpenMCL. I've only access to OpenMCL 0.12 on LinuxPPC and it doesn't seem to work there. Someone with access to a newer OpenMCL should enable it.
Helmut.
Alan Ruttenberg alanralanr@comcast.net writes:
Then add this redefinition
(defun ccl::force-break-in-listener (p) (ccl::process-interrupt p
Is there something extra needed? I get this in "(Alpha: Darwin) 0.14-031018":
Error in process listener(1): The function CCL::FORCE-BREAK-IN-LISTENER is predefined in OpenMCL. While executing: CCL::REDEFINE-KERNEL-FUNCTION Type :GO to continue, :POP to abort. If continued: Replace the definition of CCL::FORCE-BREAK-IN-LISTENER.
Type :? for other options.
On 15 Dec 2003, at 15:27, Luke Gorrie wrote:
Alan Ruttenberg alanralanr@comcast.net writes:
Then add this redefinition
(defun ccl::force-break-in-listener (p) (ccl::process-interrupt p
Is there something extra needed? I get this in "(Alpha: Darwin) 0.14-031018":
Error in process listener(1): The function CCL::FORCE-BREAK-IN-LISTENER is predefined in OpenMCL. While executing: CCL::REDEFINE-KERNEL-FUNCTION Type :GO to continue, :POP to abort. If continued: Replace the definition of CCL::FORCE-BREAK-IN-LISTENER.
Type :? for other options.
From a user standpoint, you start some long computation, type c-c c-c, and then I would expect to be thrown in the SLIME debugger, with the option continue or abort, expect them to behave accordingly. Now I get
CL-USER> (dotimes (i 10) (print i) (sleep 1))
0 1
Break in process listener(1): While executing: #<Anonymous Function #x512AD0E> Type :GO to continue, :POP to abort. If continued: Return from BREAK.
Type :? for other options. 1 > :go
This shows up in the REPL, and everything is broken when I continue.. Maybe I am doing something wrong...
Sven
Sorry about that:
(let ((ccl::*warn-if-redefine-kernel* nil)) (defun ccl::force-break-in-listener (p) (ccl::process-interrupt p #'(lambda () (ccl::ignoring-without-interrupts (let ((*swank-debugger-stack-frame* nil) (previous-p nil)) (block find-frame (map-backtrace #'(lambda(frame-number p tcr lfun pc) (declare (ignore frame-number tcr pc)) (when (eq (ccl::lfun-name lfun) 'swank::eval-region) (setq *swank-debugger-stack-frame* previous-p) (return-from find-frame)) (setq previous-p p)))) (invoke-debugger) (clear-input *terminal-io*)))))))
-Alan On Dec 15, 2003, at 9:27 AM, Luke Gorrie wrote:
Alan Ruttenberg alanralanr@comcast.net writes:
Then add this redefinition
(defun ccl::force-break-in-listener (p) (ccl::process-interrupt p
Is there something extra needed? I get this in "(Alpha: Darwin) 0.14-031018":
Error in process listener(1): The function CCL::FORCE-BREAK-IN-LISTENER is predefined in OpenMCL. While executing: CCL::REDEFINE-KERNEL-FUNCTION Type :GO to continue, :POP to abort. If continued: Replace the definition of CCL::FORCE-BREAK-IN-LISTENER.
Type :? for other options.
slime-devel site list slime-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/slime-devel
Alan Ruttenberg alanralanr@comcast.net writes:
Sorry about that:
Committed- thanks!
Sven, if you update from CVS you'll now get the C-cC-c interrupt behaviour you want due to this fix.
Of course no sooner than I send that do I realize that the way I find which frame is the top frame to show in backtrace is dumb. It works for the (dotimes (i 10) (sleep .. example, but not if you are executing something else. For now
(let ((ccl::*warn-if-redefine-kernel* nil)) (defun ccl::force-break-in-listener (p) (ccl::process-interrupt p #'(lambda () (ccl::ignoring-without-interrupts (let ((*swank-debugger-stack-frame* nil)) (invoke-debugger) (clear-input *terminal-io*)))))))
Will show you everything. I will send something better later.
-Alan
On Dec 15, 2003, at 11:09 AM, Luke Gorrie wrote:
Alan Ruttenberg alanralanr@comcast.net writes:
Sorry about that:
Committed- thanks!
Sven, if you update from CVS you'll now get the C-cC-c interrupt behaviour you want due to this fix.
slime-devel site list slime-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/slime-devel
This is better
(let ((ccl::*warn-if-redefine-kernel* nil)) (defun ccl::force-break-in-listener (p) (ccl::process-interrupt p #'(lambda () (ccl::ignoring-without-interrupts (let ((*swank-debugger-stack-frame* nil) (previous-f nil)) (block find-frame (map-backtrace #'(lambda(frame-number p tcr lfun pc) (declare (ignore frame-number tcr pc)) (when (eq previous-f 'ccl::%pascal-functions%) (setq *swank-debugger-stack-frame* p) (return-from find-frame)) (setq previous-f (ccl::lfun-name lfun))))) (invoke-debugger) (clear-input *terminal-io*)))))))
On Dec 15, 2003, at 11:09 AM, Luke Gorrie wrote:
Alan Ruttenberg alanralanr@comcast.net writes:
Sorry about that:
Committed- thanks!
Sven, if you update from CVS you'll now get the C-cC-c interrupt behaviour you want due to this fix.
slime-devel site list slime-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/slime-devel