Hi !
I was trying to simulate a break event in order to get the slime debugger buffer (*sldb*). I use the latest slime from the CVS.
Here is the problem I got :
1. I started Emacs, then type M-x "slime" 2. after the CL-USER> prompt I type "(break)"
Then I get the OpenMCL restarts :
Break in process Swank(2): While executing: "Unknown" Type :GO to continue, :POP to abort. If continued: Return from BREAK.
Type :? for other options. 1 >
The problem is that I really can't get out of this, if I type ":pop" for instance, Emacs tell me that the "Text is read only". Then Emacs is stuck there, the only way to get out of this is to quit Emacs and restart. I sometimes get the same problem when pressing return or some other key without evaluating "(break)" ...
I am sorry if this behaviour is normal, I am a Lisp newbie and I am still learning how to use the Emacs environment.
Cheers, Camille
Camille Troillard tuscland@mac.com writes:
The problem is that I really can't get out of this, if I type ":pop" for instance, Emacs tell me that the "Text is read only". Then Emacs is stuck there, the only way to get out of this is to quit Emacs and restart. I sometimes get the same problem when pressing return or some other key without evaluating "(break)" ...
You encountered two bugs at once. The first is buggy handling of asynchronous output in SLIME, which causes the "Text is read only" errors. Th CVS version contains some fixes for this.
The second problem is that OpenMCL doesn't invoke the *debugger-hook* on BREAK. This is probably more ANSI compliant than what CMUCL does, but not exactly helpful for SLIME. You can try to put something like this in your .swank.lisp:
(let ((ccl::*warn-if-redefine-kernel* nil)) (defun ccl::cbreak-loop (msg cont-string condition error-pointer) (when *debugger-hook* (let ((hook *debugger-hook*) (*debugger-hook* nil)) (funcall hook condition hook))) (let* ((*print-readably* nil)) (ccl::with-terminal-input (ccl::%break-message msg condition error-pointer) (restart-case (ccl::break-loop condition error-pointer ccl::*backtrace-on-break*) (continue () :report (lambda (stream) (write-string cont-string stream)))) (fresh-line *error-output*) nil))))
Helmut.
Hi Helmut,
I tried to put the snippet in my .swank.lisp (which gets correctly loaded) and no, unfortunately the patch doesn't work ...
Perhaps it would be a good idea to try to see what's wrong with OpenMCL. Or if you have a precise idea, tell me and I'll try to introspect it next week.
Best, Camille
On Dec 17, 2003, at 10:34 PM, Helmut Eller wrote:
Camille Troillard tuscland@mac.com writes:
The problem is that I really can't get out of this, if I type ":pop" for instance, Emacs tell me that the "Text is read only". Then Emacs is stuck there, the only way to get out of this is to quit Emacs and restart. I sometimes get the same problem when pressing return or some other key without evaluating "(break)" ...
You encountered two bugs at once. The first is buggy handling of asynchronous output in SLIME, which causes the "Text is read only" errors. Th CVS version contains some fixes for this.
The second problem is that OpenMCL doesn't invoke the *debugger-hook* on BREAK. This is probably more ANSI compliant than what CMUCL does, but not exactly helpful for SLIME. You can try to put something like this in your .swank.lisp:
(let ((ccl::*warn-if-redefine-kernel* nil)) (defun ccl::cbreak-loop (msg cont-string condition error-pointer) (when *debugger-hook* (let ((hook *debugger-hook*) (*debugger-hook* nil)) (funcall hook condition hook))) (let* ((*print-readably* nil)) (ccl::with-terminal-input (ccl::%break-message msg condition error-pointer) (restart-case (ccl::break-loop condition error-pointer ccl::*backtrace-on-break*) (continue () :report (lambda (stream) (write-string cont-string stream)))) (fresh-line *error-output*) nil))))
Helmut.
Camille Troillard tuscland@mac.com writes:
Perhaps it would be a good idea to try to see what's wrong with OpenMCL. Or if you have a precise idea, tell me and I'll try to introspect it next week.
There's nothing wrong with OpenMCL. It's just that we need a way to invoke our debugger on a break. In CMUCL we can use *DEBUGGER-HOOK* for this, because CMUCL isn't quite ANSI conform in this regard. We need a different solution for OpenMCL. The patch was written for OpenMCL 0.12 (the version I have access to), but doesn't seem to work for newer versions. You could look at the source of BREAK and change it. All you have to add is a call to *DEBUGGER-HOOK* or a call swank::swank-debugger-hook directly.
Helmut.
I just checked into the cvs code that makes (break) use the slime debugger (only for slime process) Turn it off with (setq swank::*break-in-sldb* nil) -Alan
On Dec 16, 2003, at 6:26 PM, Camille Troillard wrote:
Hi !
I was trying to simulate a break event in order to get the slime debugger buffer (*sldb*). I use the latest slime from the CVS.
Here is the problem I got :
- I started Emacs, then type M-x "slime"
- after the CL-USER> prompt I type "(break)"
Then I get the OpenMCL restarts :
Break in process Swank(2): While executing: "Unknown" Type :GO to continue, :POP to abort. If continued: Return from BREAK.
Type :? for other options. 1 >
The problem is that I really can't get out of this, if I type ":pop" for instance, Emacs tell me that the "Text is read only". Then Emacs is stuck there, the only way to get out of this is to quit Emacs and restart. I sometimes get the same problem when pressing return or some other key without evaluating "(break)" ...
I am sorry if this behaviour is normal, I am a Lisp newbie and I am still learning how to use the Emacs environment.
Cheers, Camille
slime-devel site list slime-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/slime-devel