[slime-devel] Asynchronous debugging
Daniel Barlow
dan at telent.net
Tue Nov 25 14:55:24 UTC 2003
More on yesterday's experiments. The attached patch
(1) adds :debug as a valid state transition from the idle state
(2) adds SLIME-DEBUGGER-FUNCTION. This expects to be run in an
environment in which the slime streams are available (e.g. from
*slime-repl* or, I think, with C-c :) and returns a function that
can be used for *debugger-hook* or *invoke-debugger-hook*
Note that (setf sb-debug::*invoke-debugger-hook* (slime-debugger-function))
doesn't actually work from *slime-repl* because the hook has
already been bound so you're not setting the global value.
Answers on a postcard.
(3) Changes eval-string to use *invoke-debugger-hook* instead of
ordinary *debugger-hook* - because it's safe for BREAK, and also
so it doesn't conflict with my existing (notionally portable)
*debugger-hook* use in Araneida
If I culd figure out an appropriate place to put it, I'd want to
make this a (with-debugging-hooked ...) macro, but I think that
needs build order frobbing
The combined effect is that I can now use sldb when Araneida handlers
cause errors. Setup recipe:
CL-USER> (asdf:operate 'asdf:load-op 'araneida)
....
CL-USER> (load "/home/dan/src/telent/araneida/doc/example")
T
CL-USER> (araneida:start-listening my-araneida-example::*listener*)
#<SB-IMPL::HANDLER INPUT on descriptor 5: #<FUNCTION "CLOSURE" {96F8645}>>
CL-USER> (setf araneida::*break-on-handler-errors* t)
T
CL-USER> (defvar *foo* (swank::slime-debugger-function))
#<FUNCTION "CLOSURE" {96F9815}>
;;; meanwhile in *inferior-lisp*
* (setf sb-debug::*invoke-debugger-hook* cl-user::*foo*)
I haven't applied this; it's more intended for discussion at present
(particularly point (2)). Comments?
-dan
--
http://web.metacircles.com/cirCLe_CD - Free Software Lisp/Linux distro
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/slime-devel/attachments/20031125/c7fffb3c/attachment.sig>
More information about the slime-devel
mailing list