Starting in late September, whenever I try to exit out of the debugger the repl prompt doesn't come back.
Example:
*slime-repl sbcl* CL-USER> o
*sldb sbcl/0* The variable O is unbound. [Condition of type UNBOUND-VARIABLE]
Restarts: 0: [RETRY] Retry SLIME REPL evaluation request. 1: [ABORT] Return to SLIME's top level. <-----------pick this one 2: [CLOSE-CONNECTION] Close SLIME connection 3: [ABORT] Exit debugger, returning to top level.
The repl buffer comes back with no prompt, and all further requests are pipelined.
This does not happen in clisp.
Some other info:
*slime-events* (:emacs-rex (swank:listener-eval "o\n") "COMMON-LISP-USER" :repl-thread 14) (:debug 0 1 ("The variable O is unbound." " [Condition of type UNBOUND-VARIABLE]" nil) (("RETRY" "Retry SLIME REPL evaluation request.") ("ABORT" "Return to SLIME's top level.") ("CLOSE-CONNECTION" "Close SLIME connection") ("ABORT" "Exit debugger, returning to top level.")) ((0 "(SB-INT:SIMPLE-EVAL-IN-LEXENV O #<NULL-LEXENV>)") (1 "(SWANK::EVAL-REGION "o\n")") (2 "((LAMBDA ()))") (3 "(SWANK::TRACK-PACKAGE #<CLOSURE (LAMBDA #) {25B5C3E5}>)") (4 "(SWANK::CALL-WITH-RETRY-RESTART "Retry SLIME REPL evaluation request." #<CLOSURE (LAMBDA #) {25B5C375}>)") (5 "(SWANK::CALL-WITH-BUFFER-SYNTAX NIL #<CLOSURE (LAMBDA #) {25B5C35D}>)") (6 "(SWANK::REPL-EVAL "o\n")") (7 "(SB-INT:SIMPLE-EVAL-IN-LEXENV (SWANK:LISTENER-EVAL "o\n") #<NULL-LEXENV>)") (8 "(SWANK::EVAL-FOR-EMACS (SWANK:LISTENER-EVAL "o\n") "COMMON-LISP-USER" 14)") (9 "(SWANK::PROCESS-REQUESTS NIL)") (10 "((LAMBDA ()))") (11 "((LAMBDA (SWANK-BACKEND::HOOK SWANK-BACKEND::FUN)) #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK> #<CLOSURE (LAMBDA #) {241035BD}>)") (12 "(SWANK::CALL-WITH-REDIRECTED-IO #SWANK::CONNECTION {2401F269} #<CLOSURE (LAMBDA #) {241035CD}>)") (13 "(SWANK::CALL-WITH-CONNECTION #SWANK::CONNECTION {2401F269} #<CLOSURE (LAMBDA #) {241035BD}>)") (14 "(SWANK::HANDLE-REQUESTS #<SWANK::CONNECTION {2401F269}> NIL)") (15 "((LAMBDA ()))") (16 "((LAMBDA (SWANK-BACKEND::HANDLER FUNCTION)) #<FUNCTION (LAMBDA #) {23DC867D}> #<CLOSURE (LAMBDA #) {24103555}>)") (17 "(SWANK::SIMPLE-SERVE-REQUESTS #SWANK::CONNECTION {2401F269})") (18 "(SWANK::SERVE-CONNECTION #<SB-BSD-SOCKETS:INET-SOCKET descriptor -1 {23FB59F9}> NIL NIL :ISO-8859-1)") (19 "(SWANK::SETUP-SERVER 0 #<CLOSURE (LAMBDA #) {23F4527D}> NIL NIL :ISO-8859-1)")) (14)) (:debug-activate 0 1 nil) (:emacs-rex (swank:invoke-nth-restart-for-emacs 1 1) nil 0 15) (:return (:abort) 15) (:debug-return 0 1 nil)
These are the current contribs I'm using: (require 'slime-fancy) (require 'slime-asdf)
Just using straight socket for communication:
swank:*communication-style* => nil
Matt
On Fri, 7 Nov 2008 10:55:47 -0600 "Matthew D. Swank" akopa@charter.net wrote:
Starting in late September, whenever I try to exit out of the debugger the repl prompt doesn't come back.
Is there anything I can do to make this easier to diagnose/fix?
Matt
* Matthew D. Swank [2008-11-12 03:16+0100] writes:
On Fri, 7 Nov 2008 10:55:47 -0600 "Matthew D. Swank" akopa@charter.net wrote:
Starting in late September, whenever I try to exit out of the debugger the repl prompt doesn't come back.
Is there anything I can do to make this easier to diagnose/fix?
It may help to add #-win32 before wait-for-input in swank-sbcl.lisp. If that doesn't help, enable swank:*log-events*.
Helmut.
Helmut Eller schrieb:
- Matthew D. Swank [2008-11-12 03:16+0100] writes:
On Fri, 7 Nov 2008 10:55:47 -0600 "Matthew D. Swank" akopa@charter.net wrote:
Starting in late September, whenever I try to exit out of the debugger the repl prompt doesn't come back.
Is there anything I can do to make this easier to diagnose/fix?
It may help to add #-win32 before wait-for-input in swank-sbcl.lisp. If that doesn't help, enable swank:*log-events*.
I am actually experiencing the same problem. Adding #-win32 before "(defimplementation wait-for-input (streams &optional timeout)" does not seem to have any impact (then again, I'm not really sure as to what I should be expecting anyway). I've attached the output from the *log-events* and *inferior-lisp* with swank:*log-events* set to t. All I did in the REPL was the following: (error 'foo) upon successfull initiation of the debugger, I hit "q" which runs sldb-quit and the REPL does not respond at all.
Interesting is how I get three more lines at the end inside the *inferior-lisp* buffer using CLISP: dispatch-event: (:RETURN 0 (:ABORT) 3) WRITE: (:return (:abort) 3) wait-for-event: (:EMACS-REX . SWANK::_) NIL
It looks like the abort event is for some reason not being sent when using sbcl. I get the same result with #-win32 before wait-for-input and without.
I tried with sbcl 1.0.19, sbcl 1.0.23 - as well as with GNU EmacsW32 and GNU Emacs 22.2 (non W32 ver) on Windows XP. This is using cvs slime.
Would love to help solve this problem.
Kind regards, Thomas K.
(progn (load "f:/Programme/emacs-22.2/site-lisp/slime/swank-loader.lisp" :verbose t) (funcall (read-from-string "swank-loader:init")) (funcall (read-from-string "swank:start-server") "f:/DOKUME~1/Joreji/LOKALE~1/Temp/slime.4284" :coding-system "iso-latin-1-unix"))
This is SBCL 1.0.19, an implementation of ANSI Common Lisp. More information about SBCL is available at http://www.sbcl.org/.
SBCL is free software, provided as is, with absolutely no warranty. It is mostly in the public domain; some portions are provided under BSD-style licenses. See the CREDITS and COPYING files in the distribution for more information.
This is experimental prerelease support for the Windows platform: use at your own risk. "Your Kitten of Death awaits!" * ; loading #P"f:\Programme\emacs-22.2\site-lisp\slime\swank-loader.lisp" ; loading #P"F:\Dokumente und Einstellungen\Joreji\Anwendungsdaten\.slime\fasl\2008-12-02\sbcl-1.0.19-win32-x86\swank-backend.fasl" ; loading #P"F:\Dokumente und Einstellungen\Joreji\Anwendungsdaten\.slime\fasl\2008-12-02\sbcl-1.0.19-win32-x86\swank-source-path-parser.fasl" ; loading #P"F:\Dokumente und Einstellungen\Joreji\Anwendungsdaten\.slime\fasl\2008-12-02\sbcl-1.0.19-win32-x86\swank-source-file-cache.fasl"
; compiling file "f:\Programme\emacs-22.2\site-lisp\slime\swank-sbcl.lisp" (written 04 DEC 2008 10:34:37 PM):
; file: f:\Programme\emacs-22.2\site-lisp\slime\swank-sbcl.lisp ; in: DEFIMPLEMENTATION FILENAME-TO-PATHNAME ; (PARSE-NATIVE-NAMESTRING SWANK-BACKEND::FILENAME ; SWANK-BACKEND::*PHYSICAL-PATHNAME-HOST*) ; ; caught STYLE-WARNING: ; &OPTIONAL and &KEY found in the same lambda list: ((OR (VECTOR CHARACTER) ; (VECTOR NIL) BASE-STRING ; PATHNAME FILE-STREAM) ; &OPTIONAL ; (OR CONS SB-KERNEL:HOST ; (VECTOR CHARACTER) ; (VECTOR NIL) BASE-STRING ; (MEMBER :UNSPECIFIC ; NIL)) ; (OR (VECTOR CHARACTER) ; (VECTOR NIL) BASE-STRING ; PATHNAME FILE-STREAM) ; &KEY ; (:START (MOD 536870911)) ; (:END ; (OR (MOD 536870911) NULL)) ; (:JUNK-ALLOWED T) ; (:AS-DIRECTORY T))
; in: DEFUN SET-SIGIO-HANDLER ; (SB-SYS:ENABLE-INTERRUPT SB-UNIX:SIGIO ; (LAMBDA (SIGNAL SWANK-BACKEND::CODE SWANK-BACKEND::SCP) ; (SWANK-BACKEND::SIGIO-HANDLER SIGNAL SWANK-BACKEND::CODE ; SWANK-BACKEND::SCP))) ; ; caught STYLE-WARNING: ; undefined function: SB-SYS:ENABLE-INTERRUPT
; in: DEFUN ENABLE-SIGIO-ON-FD ; (SB-POSIX::FCNTL SWANK-BACKEND::FD SB-POSIX:F-SETFL SB-POSIX:O-ASYNC) ; ; caught WARNING: ; undefined variable: SB-POSIX:F-SETFL
; (SB-POSIX::FCNTL SWANK-BACKEND::FD SB-POSIX:F-SETOWN (SWANK-BACKEND:GETPID)) ; ; caught WARNING: ; undefined variable: SB-POSIX:F-SETOWN
; (SB-POSIX::FCNTL SWANK-BACKEND::FD SB-POSIX:F-SETFL SB-POSIX:O-ASYNC) ; ; caught STYLE-WARNING: ; undefined function: SB-POSIX::FCNTL ; ; caught WARNING: ; undefined variable: SB-POSIX:O-ASYNC
; in: DEFUN SET-SIGIO-HANDLER ; (SB-SYS:ENABLE-INTERRUPT SB-UNIX:SIGIO ; (LAMBDA (SIGNAL SWANK-BACKEND::CODE SWANK-BACKEND::SCP) ; (SWANK-BACKEND::SIGIO-HANDLER SIGNAL SWANK-BACKEND::CODE ; SWANK-BACKEND::SCP))) ; ; caught WARNING: ; undefined variable: SB-UNIX:SIGIO
; ; caught WARNING: ; These variables are undefined: ; SB-POSIX:F-SETFL SB-POSIX:F-SETOWN SB-POSIX:O-ASYNC SB-UNIX:SIGIO
; ; caught STYLE-WARNING: ; These functions are undefined: ; SB-SYS:ENABLE-INTERRUPT SB-POSIX::FCNTL ; ; compilation unit finished ; caught 5 WARNING conditions ; caught 4 STYLE-WARNING conditions
; F:\Dokumente und Einstellungen\Joreji\Anwendungsdaten.slime\fasl\2008-12-02\sbcl-1.0.19-win32-x86\swank-sbcl.fasl written ; compilation finished in 0:00:01 ; loading #P"F:\Dokumente und Einstellungen\Joreji\Anwendungsdaten\.slime\fasl\2008-12-02\sbcl-1.0.19-win32-x86\swank-sbcl.fasl" STYLE-WARNING: redefining EMACS-INSPECT (#<BUILT-IN-CLASS T>) in DEFMETHOD ; compiling file "f:\Programme\emacs-22.2\site-lisp\slime\swank-gray.lisp" (written 04 DEC 2008 08:36:16 PM):
; F:\Dokumente und Einstellungen\Joreji\Anwendungsdaten.slime\fasl\2008-12-02\sbcl-1.0.19-win32-x86\swank-gray.fasl written ; compilation finished in 0:00:01 ; loading #P"F:\Dokumente und Einstellungen\Joreji\Anwendungsdaten\.slime\fasl\2008-12-02\sbcl-1.0.19-win32-x86\swank-gray.fasl" STYLE-WARNING: Implicitly creating new generic function STREAM-READ-CHAR-WILL-HANG-P. ; compiling file "f:\Programme\emacs-22.2\site-lisp\slime\swank.lisp" (written 04 DEC 2008 08:36:19 PM):
; F:\Dokumente und Einstellungen\Joreji\Anwendungsdaten.slime\fasl\2008-12-02\sbcl-1.0.19-win32-x86\swank.fasl written ; compilation finished in 0:00:01 ; loading #P"F:\Dokumente und Einstellungen\Joreji\Anwendungsdaten\.slime\fasl\2008-12-02\sbcl-1.0.19-win32-x86\swank.fasl" WARNING: SWANK also exports the following symbols: (SWANK:SIMPLE-COMPLETIONS SWANK:PPRINT-EVAL SWANK:INSPECTOR-RANGE SWANK:LISTENER-EVAL SWANK:SLDB-ABORT SWANK:STATE-STACK SWANK:START-SWANK-SERVER-IN-THREAD SWANK:DESCRIBE-SYMBOL SWANK:INTERACTIVE-EVAL SWANK:SLDB-BREAK-WITH-DEFAULT-DEBUGGER SWANK:KILL-NTH-THREAD SWANK:PPRINT-INSPECTOR-PART SWANK:SWANK-REQUIRE SWANK:SET-PACKAGE SWANK:SWANK-MACROEXPAND SWANK:INVOKE-NTH-RESTART-FOR-EMACS SWANK:COMPILE-FILE-IF-NEEDED SWANK:INSPECTOR-POP SWANK:LOAD-FILE SWANK:RE-EVALUATE-DEFVAR SWANK:VALUE-FOR-EDITING SWANK:SLDB-RETURN-FROM-FRAME SWANK:INSPECT-FRAME-VAR SWANK:UNTRACE-ALL SWANK:SLDB-DISASSEMBLE SWANK:SWANK-MACROEXPAND-ALL SWANK:PPRINT-EVAL-STRING-IN-FRAME SWANK:FIND-DEFINITION-FOR-THING SWANK:QUIT-INSPECTOR SWANK:SLDB-OUT SWANK:APROPOS-LIST-FOR-EMACS SWANK:INIT-INSPECTOR SWANK:FRAME-LOCALS-AND-CATCH-TAGS SWANK:TOGGLE-PROFILE-FDEFINITION SWANK:OPERATOR-ARGLIST SWANK:UNDEFINE-FUNCTION SWANK:SWANK-COMPILER-MACROEXPAND-1 SWANK:INSPECTOR-TOGGLE-VERBOSE SWANK:DESCRIBE-FUNCTION SWANK:IO-SPEED-TEST SWANK:SIMPLE-BREAK SWANK:INSPECTOR-CALL-NTH-ACTION SWANK:BACKTRACE SWANK:EVAL-AND-GRAB-OUTPUT SWANK:LIST-THREADS SWANK:UPDATE-INDENTATION-INFORMATION SWANK:COMPILE-MULTIPLE-STRINGS-FOR-EMACS SWANK:INSPECT-IN-FRAME SWANK:REDIRECT-TRACE-OUTPUT SWANK:SWANK-COMPILER-MACROEXPAND SWANK:QUIT-THREAD-BROWSER SWANK:INTERACTIVE-EVAL-REGION SWANK:INSPECT-NTH-PART SWANK:LIST-ALL-PACKAGE-NAMES SWANK:DISASSEMBLE-SYMBOL SWANK:EVAL-STRING-IN-FRAME SWANK:COMPILE-STRING-FOR-EMACS SWANK:PING SWANK:INSPECTOR-NEXT SWANK:SWANK-TOGGLE-TRACE SWANK:DESCRIBE-DEFINITION-FOR-EMACS SWANK:COMMIT-EDITED-VALUE SWANK:DEBUG-NTH-THREAD SWANK:DOCUMENTATION-SYMBOL SWANK:DEBUGGER-INFO-FOR-EMACS SWANK:DESCRIBE-INSPECTEE SWANK:XREF SWANK:SLDB-NEXT SWANK:FIND-SOURCE-LOCATION-FOR-EMACS SWANK:INSPECT-CURRENT-CONDITION SWANK:SLDB-CONTINUE SWANK:CONNECTION-INFO SWANK:FIND-DEFINITIONS-FOR-EMACS SWANK:MOP SWANK:THROW-TO-TOPLEVEL SWANK:INSPECTOR-NTH-PART SWANK:SWANK-MACROEXPAND-1 SWANK:INVOKE-NTH-RESTART SWANK:INSPECTOR-REINSPECT SWANK:COMPILE-FILE-FOR-EMACS) See also: The ANSI Standard, Macro DEFPACKAGE WARNING: These Swank interfaces are unimplemented: (ALL-THREADS CALLS-WHO DISASSEMBLE-FRAME INTERRUPT-THREAD RECEIVE-IF SAVE-IMAGE SEND SLDB-BREAK-AT-START SLDB-BREAK-ON-RETURN SPAWN WHO-SPECIALIZES) ;; Swank started at port: 1582. wait-for-event: (:EMACS-REX . SWANK::_) NIL READ: "(:emacs-rex (swank:connection-info) nil t 1) " dispatch-event: (:EMACS-REX (SWANK:CONNECTION-INFO) NIL T 1) send-event: 0 (:EMACS-REX (SWANK:CONNECTION-INFO) NIL 1) dispatch-event: (:INDENTATION-UPDATE (("without-package-locks" . 0) ("with-timeout" . 1) ("define-source-context" . 2) ("with-unlocked-packages" . 1) ("with-locked-hash-table" . 1) ("with-unique-names" . 1) ("defun-cached" . 2) ("with-sane-io-syntax" . 0) ("once-only" . 1) ("with-rebound-io-syntax" . 0) ("defmacro-mundanely" . 2) ("awhen" . 1) ("define-function-name-syntax" . 2) ("dohash" . 1) ("named-lambda" . 2) ("dovector" . 1) ("binding*" . 1) ("with-float-traps-masked" . 1) ("named-let" . 2) ("do-info" . 1) ("prepare-for-fast-read-byte" . 1) ("dx-flet" . 1) ("prepare-for-fast-read-char" . 1) ("dx-let" . 1) ("collect" . 1) ("maybe-pseudo-atomic" . 1) ("with-cycle-counter" . 0) ("with-empty-tn@fp-top" . 1) ("with-tn@fp-top" . 1) ("with-fixed-allocation" . 1) ("descend-into" . 1) ("with-single-package-locked-error" . 1) ("with-circularity-detection" . 1) ("number-dispatch" . 1) ("with-local-interrupts" . 0) ("allow-with-interrupts" . 0) ("without-gcing" . 0) ("with-deadline" . 1) ("without-interrupts" . 0) ("with-interrupts" . 0) ("with-pinned-objects" . 1) ("with-active-processes-lock" . 1) ("def-output-routines" . 1) ("with-default-decoding-replacement" . 1) ("with-c-strvec" . 1) ("with-stepping-enabled" . 0) ("define-sequence-traverser" . 2) ("output-wrapper" . 1) ("string-dispatch" . 2) ("with-finalizer-store-lock" . 0) ("with-pathname" . 1) ("with-available-buffers-lock" . 1) ("with-stepping-disabled" . 0) ("with-host" . 1) ("with-symbol" . 1) ("with-push-char" . 1) ("lambda-with-lexenv" . 3) ("with-hash-table-locks" . 1) ("def-output-routines/variable-width" . 1) ("with-reader" . 1) ("input-wrapper" . 1) ("with-packages" . 1) ("with-standard-replacement-character" . 0) ("with-native-pathname" . 1) ("with-descriptor-handlers" . 0) ("input-wrapper/variable-width" . 1) ("output-wrapper/variable-width" . 1) ("with-concurrent-access-check" . 2) ("with-scheduler-lock" . 1) ("handling-end-of-the-world" . 0) ("do-debug-block-locations" . 1) ("do-debug-fun-vars" . 1) ("do-debug-fun-blocks" . 1) ("maybe-with-pinned-objects" . 2) ("define-alien-type-translator" . 2) ("bind-fast-lexical-method-functions" . 1) ("pv-binding" . 1) ("dolist-carefully" . 1) ("bind-args" . 1) ("with-dfun-wrappers" . 3) ("simple-lexical-method-functions" . 1) ("with-pcl-lock" . 0) ("doplist" . 2) ("with-type-checked" . 1) ("pv-binding1" . 1) ("dotimes-fixnum" . 1) ("dfun-miss" . 1) ("fast-lexical-method-functions" . 1) ("bind-simple-lexical-method-functions" . 1) ("with-alien" . 1) ("define-alien-callback" . 3) ("alien-lambda" . 2) ("with-auxiliary-alien-types" . 1) ("define-instruction-macro" . 2) ("without-scheduling" . 1) ("assemble" . 1) ("do-sset-elements" . 1) ("note-dependencies" . 1) ("with-modified-segment-index-and-posn" . 1) ("sc-case" . 1) ("deftransform" . 2) ("define-vop" . 1) ("with-source-location" . 1) ("define-source-transform" . 2) ("defoptimizer" . 2) ("defknown" . 4) ("source-transform-lambda" . 1) ("define-move-fun" . 3) ("define-assembly-routine" . 2) ("def-ir1-translator" . 2) ("with-component-last-block" . 1) ("define-internal-pcl-function-name-syntax" . 1) ("do-nodes-carefully" . 1) ("do-ir2-blocks" . 1) ("with-fun-name-leaf" . 1) ("do-blocks" . 1) ("with-ir1-namespace" . 0) ("with-compilation-values" . 0) ("do-forms-from-info" . 1) ("with-compiler-io-syntax" . 0) ("do-packed-tns" . 1) ("do-live-tns" . 1) ("define-modular-fun-optimizer" . 2) ("do-eql-vars" . 1) ("do-nodes" . 1) ("do-sc-pairs" . 1) ("do-physenv-ir2-blocks" . 1) ("do-blocks-backwards" . 1) ("do-nodes-backwards" . 1) ("processing-decls" . 1) ("do-uses" . 1) ("with-fop-stack" . 1) ("expand-bind-defaults" . 2) ("def-format-directive" . 2) ("def-complex-format-directive" . 2) ("with-new-session" . 1) ("with-mutex" . 1) ("with-recursive-lock" . 1) ("with-spinlock" . 1) ("with-session-lock" . 1) ("with-system-mutex" . 1) ("with-all-threads-lock" . 0) ("with-recursive-spinlock" . 1) ("with-interruptions-lock" . 1) ("with-recursive-system-spinlock" . 1) ("with-system-spinlock" . 1) ("with-pretty-stream" . 1) ("with-sequence-iterator" . 2) ("dosequence" . 1) ("with-sequence-iterator-functions" . 2) ("with-new-definition-in-environment" . 1) ("with-augmented-environment" . 1) ("walker-environment-bind" . 1) ("program-destructuring-bind" . 2) ("with-process-times" . 1) ("with-sysfun" . 1) ("with-funcname" . 1) ("with-loop-list-collection-head" . 1) ("with-minimax-value" . 1) ("with-compilation-hooks" . 1) ("with-struct" . 2) ("with-debootstrapping" . 0) ("with-slime-output-stream" . 1) ("defimplementation" . 2) ("defsystem" . 1) ("with-hostent" . 2) ("with-wsa-data" . 2) ("with-sockaddr-in" . 2) ("with-array-data" . 1) ("with-protoent" . 2) ("with-in-addr" . 2) ("with-vector-sap" . 1) ("with-sockaddr-for" . 1) ("with-alien-stat" . 2) ("with-dirent" . 2) ("define-entry-point" . 2) ("with-growing-c-string" . 1) ("define-designator" . 2) ("with-slime-interrupts" . 0) ("with-buffer-syntax" . 1) ("with-connection" . 1) ("with-top-level-restart" . 1) ("without-slime-interrupts" . 0) ("with-describe-settings" . 1) ("defslimefun" . 2) ("do-symbols*" . 1) ("with-bindings" . 1) ("with-retry-restart" . 1) ("without-interrupts" . 0) ("with-thread-description" . 1) ("with-temp-package" . 1) ("with-swank-error-handler" . 1) ("with-struct*" . 1) ("with-panic-handler" . 1) ("with-io-redirection" . 1))) WRITE: (:indentation-update (("without-package-locks" . 0) ("with-timeout" . 1) ("define-source-context" . 2) ("with-unlocked-packages" . 1) ("with-locked-hash-table" . 1) ("with-unique-names" . 1) ("defun-cached" . 2) ("with-sane-io-syntax" . 0) ("once-only" . 1) ("with-rebound-io-syntax" . 0) ("defmacro-mundanely" . 2) ("awhen" . 1) ("define-function-name-syntax" . 2) ("dohash" . 1) ("named-lambda" . 2) ("dovector" . 1) ("binding*" . 1) ("with-float-traps-masked" . 1) ("named-let" . 2) ("do-info" . 1) ("prepare-for-fast-read-byte" . 1) ("dx-flet" . 1) ("prepare-for-fast-read-char" . 1) ("dx-let" . 1) ("collect" . 1) ("maybe-pseudo-atomic" . 1) ("with-cycle-counter" . 0) ("with-empty-tn@fp-top" . 1) ("with-tn@fp-top" . 1) ("with-fixed-allocation" . 1) ("descend-into" . 1) ("with-single-package-locked-error" . 1) ("with-circularity-detection" . 1) ("number-dispatch" . 1) ("with-local-interrupts" . 0) ("allow-with-interrupts" . 0) ("without-gcing" . 0) ("with-deadline" . 1) ("without-interrupts" . 0) ("with-interrupts" . 0) ("with-pinned-objects" . 1) ("with-active-processes-lock" . 1) ("def-output-routines" . 1) ("with-default-decoding-replacement" . 1) ("with-c-strvec" . 1) ("with-stepping-enabled" . 0) ("define-sequence-traverser" . 2) ("output-wrapper" . 1) ("string-dispatch" . 2) ("with-finalizer-store-lock" . 0) ("with-pathname" . 1) ("with-available-buffers-lock" . 1) ("with-stepping-disabled" . 0) ("with-host" . 1) ("with-symbol" . 1) ("with-push-char" . 1) ("lambda-with-lexenv" . 3) ("with-hash-table-locks" . 1) ("def-output-routines/variable-width" . 1) ("with-reader" . 1) ("input-wrapper" . 1) ("with-packages" . 1) ("with-standard-replacement-character" . 0) ("with-native-pathname" . 1) ("with-descriptor-handlers" . 0) ("input-wrapper/variable-width" . 1) ("output-wrapper/variable-width" . 1) ("with-concurrent-access-check" . 2) ("with-scheduler-lock" . 1) ("handling-end-of-the-world" . 0) ("do-debug-block-locations" . 1) ("do-debug-fun-vars" . 1) ("do-debug-fun-blocks" . 1) ("maybe-with-pinned-objects" . 2) ("define-alien-type-translator" . 2) ("bind-fast-lexical-method-functions" . 1) ("pv-binding" . 1) ("dolist-carefully" . 1) ("bind-args" . 1) ("with-dfun-wrappers" . 3) ("simple-lexical-method-functions" . 1) ("with-pcl-lock" . 0) ("doplist" . 2) ("with-type-checked" . 1) ("pv-binding1" . 1) ("dotimes-fixnum" . 1) ("dfun-miss" . 1) ("fast-lexical-method-functions" . 1) ("bind-simple-lexical-method-functions" . 1) ("with-alien" . 1) ("define-alien-callback" . 3) ("alien-lambda" . 2) ("with-auxiliary-alien-types" . 1) ("define-instruction-macro" . 2) ("without-scheduling" . 1) ("assemble" . 1) ("do-sset-elements" . 1) ("note-dependencies" . 1) ("with-modified-segment-index-and-posn" . 1) ("sc-case" . 1) ("deftransform" . 2) ("define-vop" . 1) ("with-source-location" . 1) ("define-source-transform" . 2) ("defoptimizer" . 2) ("defknown" . 4) ("source-transform-lambda" . 1) ("define-move-fun" . 3) ("define-assembly-routine" . 2) ("def-ir1-translator" . 2) ("with-component-last-block" . 1) ("define-internal-pcl-function-name-syntax" . 1) ("do-nodes-carefully" . 1) ("do-ir2-blocks" . 1) ("with-fun-name-leaf" . 1) ("do-blocks" . 1) ("with-ir1-namespace" . 0) ("with-compilation-values" . 0) ("do-forms-from-info" . 1) ("with-compiler-io-syntax" . 0) ("do-packed-tns" . 1) ("do-live-tns" . 1) ("define-modular-fun-optimizer" . 2) ("do-eql-vars" . 1) ("do-nodes" . 1) ("do-sc-pairs" . 1) ("do-physenv-ir2-blocks" . 1) ("do-blocks-backwards" . 1) ("do-nodes-backwards" . 1) ("processing-decls" . 1) ("do-uses" . 1) ("with-fop-stack" . 1) ("expand-bind-defaults" . 2) ("def-format-directive" . 2) ("def-complex-format-directive" . 2) ("with-new-session" . 1) ("with-mutex" . 1) ("with-recursive-lock" . 1) ("with-spinlock" . 1) ("with-session-lock" . 1) ("with-system-mutex" . 1) ("with-all-threads-lock" . 0) ("with-recursive-spinlock" . 1) ("with-interruptions-lock" . 1) ("with-recursive-system-spinlock" . 1) ("with-system-spinlock" . 1) ("with-pretty-stream" . 1) ("with-sequence-iterator" . 2) ("dosequence" . 1) ("with-sequence-iterator-functions" . 2) ("with-new-definition-in-environment" . 1) ("with-augmented-environment" . 1) ("walker-environment-bind" . 1) ("program-destructuring-bind" . 2) ("with-process-times" . 1) ("with-sysfun" . 1) ("with-funcname" . 1) ("with-loop-list-collection-head" . 1) ("with-minimax-value" . 1) ("with-compilation-hooks" . 1) ("with-struct" . 2) ("with-debootstrapping" . 0) ("with-slime-output-stream" . 1) ("defimplementation" . 2) ("defsystem" . 1) ("with-hostent" . 2) ("with-wsa-data" . 2) ("with-sockaddr-in" . 2) ("with-array-data" . 1) ("with-protoent" . 2) ("with-in-addr" . 2) ("with-vector-sap" . 1) ("with-sockaddr-for" . 1) ("with-alien-stat" . 2) ("with-dirent" . 2) ("define-entry-point" . 2) ("with-growing-c-string" . 1) ("define-designator" . 2) ("with-slime-interrupts" . 0) ("with-buffer-syntax" . 1) ("with-connection" . 1) ("with-top-level-restart" . 1) ("without-slime-interrupts" . 0) ("with-describe-settings" . 1) ("defslimefun" . 2) ("do-symbols*" . 1) ("with-bindings" . 1) ("with-retry-restart" . 1) ("without-interrupts" . 0) ("with-thread-description" . 1) ("with-temp-package" . 1) ("with-swank-error-handler" . 1) ("with-struct*" . 1) ("with-panic-handler" . 1) ("with-io-redirection" . 1))) dispatch-event: (:RETURN 0 (:OK (:PID 9544 :STYLE NIL :LISP-IMPLEMENTATION (:TYPE "SBCL" :NAME "sbcl" :VERSION "1.0.19") :MACHINE (:INSTANCE "HELLSHEAVEN" :TYPE "X86" :VERSION NIL) :FEATURES (:ASDF :ANSI-CL :COMMON-LISP :SBCL :SB-DOC :SB-TEST :SB-LDB :SB-PACKAGE-LOCKS :SB-UNICODE :SB-EVAL :SB-SOURCE-LOCATIONS :IEEE-FLOATING-POINT :X86 :WIN32 :GENCGC :STACK-GROWS-DOWNWARD-NOT-UPWARD :C-STACK-IS-CONTROL-STACK :COMPARE-AND-SWAP-VOPS :UNWIND-TO-FRAME-AND-CALL-VOP :RAW-INSTANCE-INIT-VOPS :STACK-ALLOCATABLE-CLOSURES :ALIEN-CALLBACKS :CYCLE-COUNTER :LINKAGE-TABLE :OS-PROVIDES-DLOPEN :OS-PROVIDES-PUTWC) :MODULES ("SB-CLTL2" "SB-POSIX" "SB-INTROSPECT" "SB-BSD-SOCKETS" "SB-GROVEL" "ASDF") :PACKAGE (:NAME "COMMON-LISP-USER" :PROMPT "CL-USER") :VERSION "2008-12-02")) 1) WRITE: (:return (:ok (:pid 9544 :style nil :lisp-implementation (:type "SBCL" :name "sbcl" :version "1.0.19") :machine (:instance "HELLSHEAVEN" :type "X86" :version nil) :features (:asdf :ansi-cl :common-lisp :sbcl :sb-doc :sb-test :sb-ldb :sb-package-locks :sb-unicode :sb-eval :sb-source-locations :ieee-floating-point :x86 :win32 :gencgc :stack-grows-downward-not-upward :c-stack-is-control-stack :compare-and-swap-vops :unwind-to-frame-and-call-vop :raw-instance-init-vops :stack-allocatable-closures :alien-callbacks :cycle-counter :linkage-table :os-provides-dlopen :os-provides-putwc) :modules ("SB-CLTL2" "SB-POSIX" "SB-INTROSPECT" "SB-BSD-SOCKETS" "SB-GROVEL" "ASDF") :package (:name "COMMON-LISP-USER" :prompt "CL-USER") :version "2008-12-02")) 1) wait-for-event: (:EMACS-REX . SWANK::_) NIL READ: "(:emacs-rex (swank:operator-arglist "error" "COMMON-LISP-USER") "COMMON-LISP-USER" :repl-thread 2) " dispatch-event: (:EMACS-REX (SWANK:OPERATOR-ARGLIST "error" "COMMON-LISP-USER") "COMMON-LISP-USER" :REPL-THREAD 2) send-event: 0 (:EMACS-REX (SWANK:OPERATOR-ARGLIST "error" "COMMON-LISP-USER") "COMMON-LISP-USER" 2) dispatch-event: (:RETURN 0 (:OK "(error DATUM &REST ARGUMENTS)") 2) WRITE: (:return (:ok "(error DATUM &REST ARGUMENTS)") 2) wait-for-event: (:EMACS-REX . SWANK::_) NIL READ: "(:emacs-rex (swank:listener-eval "(error 'foo)
") "COMMON-LISP-USER" :repl-thread 3) " dispatch-event: (:EMACS-REX (SWANK:LISTENER-EVAL "(error 'foo)
") "COMMON-LISP-USER" :REPL-THREAD 3) send-event: 0 (:EMACS-REX (SWANK:LISTENER-EVAL "(error 'foo)
") "COMMON-LISP-USER" 3) dispatch-event: (:DEBUG 0 1 ("Bad type argument: FOO" " [Condition of type SIMPLE-TYPE-ERROR]" NIL) (("RETRY" "Retry SLIME REPL evaluation request.") ("ABORT" "Return to SLIME's top level.") ("CLOSE-CONNECTION" "Close SLIME connection") ("ABORT" "Exit debugger, returning to top level.")) ((0 "(MAKE-CONDITION FOO)[:EXTERNAL]") (1 "(ERROR FOO)[:EXTERNAL]") (2 "(SB-INT:SIMPLE-EVAL-IN-LEXENV (ERROR 'FOO) #<NULL-LEXENV>)") (3 "(SWANK::EVAL-REGION "(error 'foo)\n\n")") (4 "((LAMBDA ()))") (5 "(SWANK::TRACK-PACKAGE #<CLOSURE (LAMBDA #) {249FFCC5}>)") (6 "(SWANK::CALL-WITH-RETRY-RESTART "Retry SLIME REPL evaluation request." #<CLOSURE (LAMBDA #) {249FFC55}>)") (7 "(SWANK::CALL-WITH-BUFFER-SYNTAX NIL #<CLOSURE (LAMBDA #) {249FFC3D}>)") (8 "(SWANK::REPL-EVAL "(error 'foo)\n\n")") (9 "(SB-INT:SIMPLE-EVAL-IN-LEXENV (SWANK:LISTENER-EVAL "(error 'foo)\n\n") #<NULL-LEXENV>)") (10 "(SWANK::EVAL-FOR-EMACS (SWANK:LISTENER-EVAL "(error 'foo)\n\n") "COMMON-LISP-USER" 3)") (11 "(SWANK::PROCESS-REQUESTS NIL)") (12 "((LAMBDA ()))") (13 "((FLET #:FORM-FUN1276))") (14 "((LAMBDA (SWANK-BACKEND::HOOK SWANK-BACKEND::FUN)) #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK> #<CLOSURE (LAMBDA #) {249814F5}>)") (15 "(SWANK::CALL-WITH-REDIRECTED-IO #<SWANK::CONNECTION {248970F9}> #<CLOSURE (LAMBDA #) {24981505}>)") (16 "(SWANK::CALL-WITH-CONNECTION #<SWANK::CONNECTION {248970F9}> #<CLOSURE (LAMBDA #) {249814F5}>)") (17 "(SWANK::HANDLE-REQUESTS #<SWANK::CONNECTION {248970F9}> NIL)") (18 "((LAMBDA ()))") (19 "((LAMBDA (SWANK-BACKEND::HANDLER FUNCTION)) #<FUNCTION (LAMBDA #) {246800AD}> #<CLOSURE (LAMBDA #) {2498148D}>)")) (3)) WRITE: (:debug 0 1 ("Bad type argument: FOO" " [Condition of type SIMPLE-TYPE-ERROR]" nil) (("RETRY" "Retry SLIME REPL evaluation request.") ("ABORT" "Return to SLIME's top level.") ("CLOSE-CONNECTION" "Close SLIME connection") ("ABORT" "Exit debugger, returning to top level.")) ((0 "(MAKE-CONDITION FOO)[:EXTERNAL]") (1 "(ERROR FOO)[:EXTERNAL]") (2 "(SB-INT:SIMPLE-EVAL-IN-LEXENV (ERROR 'FOO) #<NULL-LEXENV>)") (3 "(SWANK::EVAL-REGION "(error 'foo)\n\n")") (4 "((LAMBDA ()))") (5 "(SWANK::TRACK-PACKAGE #<CLOSURE (LAMBDA #) {249FFCC5}>)") (6 "(SWANK::CALL-WITH-RETRY-RESTART "Retry SLIME REPL evaluation request." #<CLOSURE (LAMBDA #) {249FFC55}>)") (7 "(SWANK::CALL-WITH-BUFFER-SYNTAX NIL #<CLOSURE (LAMBDA #) {249FFC3D}>)") (8 "(SWANK::REPL-EVAL "(error 'foo)\n\n")") (9 "(SB-INT:SIMPLE-EVAL-IN-LEXENV (SWANK:LISTENER-EVAL "(error 'foo)\n\n") #<NULL-LEXENV>)") (10 "(SWANK::EVAL-FOR-EMACS (SWANK:LISTENER-EVAL "(error 'foo)\n\n") "COMMON-LISP-USER" 3)") (11 "(SWANK::PROCESS-REQUESTS NIL)") (12 "((LAMBDA ()))") (13 "((FLET #:FORM-FUN1276))") (14 "((LAMBDA (SWANK-BACKEND::HOOK SWANK-BACKEND::FUN)) #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK> #<CLOSURE (LAMBDA #) {249814F5}>)") (15 "(SWANK::CALL-WITH-REDIRECTED-IO #<SWANK::CONNECTION {248970F9}> #<CLOSURE (LAMBDA #) {24981505}>)") (16 "(SWANK::CALL-WITH-CONNECTION #<SWANK::CONNECTION {248970F9}> #<CLOSURE (LAMBDA #) {249814F5}>)") (17 "(SWANK::HANDLE-REQUESTS #<SWANK::CONNECTION {248970F9}> NIL)") (18 "((LAMBDA ()))") (19 "((LAMBDA (SWANK-BACKEND::HANDLER FUNCTION)) #<FUNCTION (LAMBDA #) {246800AD}> #<CLOSURE (LAMBDA #) {2498148D}>)")) (3)) dispatch-event: (:DEBUG-ACTIVATE 0 1 NIL) WRITE: (:debug-activate 0 1 nil) wait-for-event: (COMMON-LISP:OR (:EMACS-REX . SWANK::_) (:SLDB-RETURN 2)) NIL READ: "(:emacs-rex (swank:throw-to-toplevel) nil 0 4) " dispatch-event: (:EMACS-REX (SWANK:THROW-TO-TOPLEVEL) NIL 0 4) send-event: 0 (:EMACS-REX (SWANK:THROW-TO-TOPLEVEL) NIL 4) dispatch-event: (:RETURN 0 (:ABORT) 4) WRITE: (:return (:abort) 4) dispatch-event: (:DEBUG-RETURN 0 1 NIL) WRITE: (:debug-return 0 1 nil) wait-for-event: (:SLDB-RETURN 2) T
(:emacs-rex (swank:connection-info) nil t 1) (:indentation-update (("without-package-locks" . 0) ("with-timeout" . 1) ("define-source-context" . 2) ("with-unlocked-packages" . 1) ("with-locked-hash-table" . 1) ("with-unique-names" . 1) ("defun-cached" . 2) ("with-sane-io-syntax" . 0) ("once-only" . 1) ("with-rebound-io-syntax" . 0) ("defmacro-mundanely" . 2) ("awhen" . 1) ("define-function-name-syntax" . 2) ("dohash" . 1) ("named-lambda" . 2) ("dovector" . 1) ("binding*" . 1) ("with-float-traps-masked" . 1) ("named-let" . 2) ("do-info" . 1) ...)) (:return (:ok (:pid 9544 :style nil :lisp-implementation (:type "SBCL" :name "sbcl" :version "1.0.19") :machine (:instance "HELLSHEAVEN" :type "X86" :version nil) :features (:asdf :ansi-cl :common-lisp :sbcl :sb-doc :sb-test :sb-ldb :sb-package-locks :sb-unicode :sb-eval :sb-source-locations :ieee-floating-point :x86 :win32 :gencgc :stack-grows-downward-not-upward :c-stack-is-control-stack :compare-and-swap-vops :unwind-to-frame-and-call-vop :raw-instance-init-vops ...) :modules ("SB-CLTL2" "SB-POSIX" "SB-INTROSPECT" "SB-BSD-SOCKETS" "SB-GROVEL" "ASDF") :package (:name "COMMON-LISP-USER" :prompt "CL-USER") :version "2008-12-02")) 1) (:emacs-rex (swank:operator-arglist "error" "COMMON-LISP-USER") "COMMON-LISP-USER" :repl-thread 2) (:return (:ok "(error DATUM &REST ARGUMENTS)") 2) (:emacs-rex (swank:listener-eval "(error 'foo)\n\n") "COMMON-LISP-USER" :repl-thread 3) (:debug 0 1 ("Bad type argument:\n FOO" " [Condition of type SIMPLE-TYPE-ERROR]" nil) (("RETRY" "Retry SLIME REPL evaluation request.") ("ABORT" "Return to SLIME's top level.") ("CLOSE-CONNECTION" "Close SLIME connection") ("ABORT" "Exit debugger, returning to top level.")) ((0 "(MAKE-CONDITION FOO)[:EXTERNAL]") (1 "(ERROR FOO)[:EXTERNAL]") (2 "(SB-INT:SIMPLE-EVAL-IN-LEXENV (ERROR 'FOO) #<NULL-LEXENV>)") (3 "(SWANK::EVAL-REGION "(error 'foo)\n\n")") (4 "((LAMBDA ()))") (5 "(SWANK::TRACK-PACKAGE #<CLOSURE (LAMBDA #) {249FFCC5}>)") (6 "(SWANK::CALL-WITH-RETRY-RESTART "Retry SLIME REPL evaluation request." #<CLOSURE (LAMBDA #) {249FFC55}>)") (7 "(SWANK::CALL-WITH-BUFFER-SYNTAX NIL #<CLOSURE (LAMBDA #) {249FFC3D}>)") (8 "(SWANK::REPL-EVAL "(error 'foo)\n\n")") (9 "(SB-INT:SIMPLE-EVAL-IN-LEXENV (SWANK:LISTENER-EVAL "(error 'foo)\n\n") #<NULL-LEXENV>)") (10 "(SWANK::EVAL-FOR-EMACS (SWANK:LISTENER-EVAL "(error 'foo)\n\n") "COMMON-LISP-USER" 3)") (11 "(SWANK::PROCESS-REQUESTS NIL)") (12 "((LAMBDA ()))") (13 "((FLET #:FORM-FUN1276))") (14 "((LAMBDA (SWANK-BACKEND::HOOK SWANK-BACKEND::FUN)) #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK> #<CLOSURE (LAMBDA #) {249814F5}>)") (15 "(SWANK::CALL-WITH-REDIRECTED-IO #<SWANK::CONNECTION {248970F9}> #<CLOSURE (LAMBDA #) {24981505}>)") (16 "(SWANK::CALL-WITH-CONNECTION #<SWANK::CONNECTION {248970F9}> #<CLOSURE (LAMBDA #) {249814F5}>)") (17 "(SWANK::HANDLE-REQUESTS #<SWANK::CONNECTION {248970F9}> NIL)") (18 "((LAMBDA ()))") (19 "((LAMBDA (SWANK-BACKEND::HANDLER FUNCTION)) #<FUNCTION (LAMBDA #) {246800AD}> #<CLOSURE (LAMBDA #) {2498148D}>)")) (3)) (:debug-activate 0 1 nil) (:emacs-rex (swank:throw-to-toplevel) nil 0 4) (:return (:abort) 4) (:debug-return 0 1 nil)
* Thomas Karolski [2008-12-04 23:29+0100] writes:
It looks like the abort event is for some reason not being sent when using sbcl. I get the same result with #-win32 before wait-for-input and without.
Does READ-CHAR-NO-HANG work properly on socket streams? There is a comment in HANDLE-LISTEN (in win32.lisp)
;; FIXME-SOCKETS: Try again here with WSAEventSelect in case ;; HANDLE is a socket.
which makes it sound like that isn't implemented yet.
I suspect that WAIT-FOR-EVENT/EVENT-LOOP (in swank.lisp) blocks even though the timeout argument is t. To see if that's actually the case, you could generate some debug output in WAIT-FOR-EVENT/EVENT-LOOP. It's the easiest if you use LOG-EVENT for that.
Helmut.
Helmut Eller schrieb:
Does READ-CHAR-NO-HANG work properly on socket streams? There is a comment in HANDLE-LISTEN (in win32.lisp)
Not sure - how could I test that? I think it should work on gray streams, but I'm not sure what slime is using.
I suspect that WAIT-FOR-EVENT/EVENT-LOOP (in swank.lisp) blocks even though the timeout argument is t. To see if that's actually the case, you could generate some debug output in WAIT-FOR-EVENT/EVENT-LOOP. It's the easiest if you use LOG-EVENT for that.
Changed wait-for-event/event-loop into: -------------------------------- (defun wait-for-event/event-loop (pattern timeout) (assert (or (not timeout) (eq timeout t))) (log-event "wait-for-event/event-loop: ~s ~s~%" pattern timeout) (let ((r (loop (check-slime-interrupts) (let ((event (poll-for-event pattern))) (when event (return (car event)))) (log-event "pre wait-for-input~%") (let ((events-enqueued *events-enqueued*) (ready (wait-for-input (list (current-socket-io)) timeout))) (log-event "after wait-for-input~%") (cond ((and timeout (not ready)) (return (values nil t))) ((or (/= events-enqueued *events-enqueued*) (eq ready :interrupt)) ;; rescan event queue, interrupts may enqueue new events ) (t (assert (equal ready (list (current-socket-io)))) (dispatch-event (decode-message (current-socket-io))))))))) (log-event "-wait-for-event/event-loop: ~s~%" r) r)) -------------------------------- I attached the new *inferior-lisp* buffer. The last message is "pre wait-for-input", which indicates that its hanging inside wait-for-input. I also tried putting a log-event before read-char-no-hang inside wait-for-input, but that didn't seem to get logged for some reason. Seeing this I guess you're right. Is there any way to work around this issue? - it does work for earlier calls to wait-for-input after all (though those all don't have a timeout).
Regards, Thomas K.
(progn (load "f:/Programme/emacs-22.2/site-lisp/slime/swank-loader.lisp" :verbose t) (funcall (read-from-string "swank-loader:init")) (funcall (read-from-string "swank:start-server") "f:/DOKUME~1/Joreji/LOKALE~1/Temp/slime.4776" :coding-system "iso-latin-1-unix"))
This is SBCL 1.0.19, an implementation of ANSI Common Lisp. More information about SBCL is available at http://www.sbcl.org/.
SBCL is free software, provided as is, with absolutely no warranty. It is mostly in the public domain; some portions are provided under BSD-style licenses. See the CREDITS and COPYING files in the distribution for more information.
This is experimental prerelease support for the Windows platform: use at your own risk. "Your Kitten of Death awaits!" * ; loading #P"f:\Programme\emacs-22.2\site-lisp\slime\swank-loader.lisp" ; loading #P"F:\Dokumente und Einstellungen\Joreji\Anwendungsdaten\.slime\fasl\2008-12-02\sbcl-1.0.19-win32-x86\swank-backend.fasl" ; loading #P"F:\Dokumente und Einstellungen\Joreji\Anwendungsdaten\.slime\fasl\2008-12-02\sbcl-1.0.19-win32-x86\swank-source-path-parser.fasl" ; loading #P"F:\Dokumente und Einstellungen\Joreji\Anwendungsdaten\.slime\fasl\2008-12-02\sbcl-1.0.19-win32-x86\swank-source-file-cache.fasl" ; loading #P"F:\Dokumente und Einstellungen\Joreji\Anwendungsdaten\.slime\fasl\2008-12-02\sbcl-1.0.19-win32-x86\swank-sbcl.fasl" STYLE-WARNING: redefining EMACS-INSPECT (#<BUILT-IN-CLASS T>) in DEFMETHOD ; loading #P"F:\Dokumente und Einstellungen\Joreji\Anwendungsdaten\.slime\fasl\2008-12-02\sbcl-1.0.19-win32-x86\swank-gray.fasl" STYLE-WARNING: Implicitly creating new generic function STREAM-READ-CHAR-WILL-HANG-P. ; loading #P"F:\Dokumente und Einstellungen\Joreji\Anwendungsdaten\.slime\fasl\2008-12-02\sbcl-1.0.19-win32-x86\swank.fasl" WARNING: These Swank interfaces are unimplemented: (ALL-THREADS CALLS-WHO DISASSEMBLE-FRAME INTERRUPT-THREAD RECEIVE-IF SAVE-IMAGE SEND SLDB-BREAK-AT-START SLDB-BREAK-ON-RETURN SPAWN WHO-SPECIALIZES) ;; Swank started at port: 3793. wait-for-event: (:EMACS-REX . SWANK::_) NIL wait-for-event/event-loop: (:EMACS-REX . SWANK::_) NIL pre wait-for-input after wait-for-input READ: "(:emacs-rex (swank:connection-info) nil t 1) " dispatch-event: (:EMACS-REX (SWANK:CONNECTION-INFO) NIL T 1) send-event: 0 (:EMACS-REX (SWANK:CONNECTION-INFO) NIL 1) -wait-for-event/event-loop: (:EMACS-REX (SWANK:CONNECTION-INFO) NIL 1) dispatch-event: (:INDENTATION-UPDATE (("without-package-locks" . 0) ("with-timeout" . 1) ("define-source-context" . 2) ("with-unlocked-packages" . 1) ("with-locked-hash-table" . 1) ("with-unique-names" . 1) ("defun-cached" . 2) ("with-sane-io-syntax" . 0) ("once-only" . 1) ("with-rebound-io-syntax" . 0) ("defmacro-mundanely" . 2) ("awhen" . 1) ("define-function-name-syntax" . 2) ("dohash" . 1) ("named-lambda" . 2) ("dovector" . 1) ("binding*" . 1) ("with-float-traps-masked" . 1) ("named-let" . 2) ("do-info" . 1) ("prepare-for-fast-read-byte" . 1) ("dx-flet" . 1) ("prepare-for-fast-read-char" . 1) ("dx-let" . 1) ("collect" . 1) ("maybe-pseudo-atomic" . 1) ("with-cycle-counter" . 0) ("with-empty-tn@fp-top" . 1) ("with-tn@fp-top" . 1) ("with-fixed-allocation" . 1) ("descend-into" . 1) ("with-single-package-locked-error" . 1) ("with-circularity-detection" . 1) ("number-dispatch" . 1) ("with-local-interrupts" . 0) ("allow-with-interrupts" . 0) ("without-gcing" . 0) ("with-deadline" . 1) ("without-interrupts" . 0) ("with-interrupts" . 0) ("with-pinned-objects" . 1) ("with-active-processes-lock" . 1) ("def-output-routines" . 1) ("with-default-decoding-replacement" . 1) ("with-c-strvec" . 1) ("with-stepping-enabled" . 0) ("define-sequence-traverser" . 2) ("output-wrapper" . 1) ("string-dispatch" . 2) ("with-finalizer-store-lock" . 0) ("with-pathname" . 1) ("with-available-buffers-lock" . 1) ("with-stepping-disabled" . 0) ("with-host" . 1) ("with-symbol" . 1) ("with-push-char" . 1) ("lambda-with-lexenv" . 3) ("with-hash-table-locks" . 1) ("def-output-routines/variable-width" . 1) ("with-reader" . 1) ("input-wrapper" . 1) ("with-packages" . 1) ("with-standard-replacement-character" . 0) ("with-native-pathname" . 1) ("with-descriptor-handlers" . 0) ("input-wrapper/variable-width" . 1) ("output-wrapper/variable-width" . 1) ("with-concurrent-access-check" . 2) ("with-scheduler-lock" . 1) ("handling-end-of-the-world" . 0) ("do-debug-block-locations" . 1) ("do-debug-fun-vars" . 1) ("do-debug-fun-blocks" . 1) ("maybe-with-pinned-objects" . 2) ("define-alien-type-translator" . 2) ("bind-fast-lexical-method-functions" . 1) ("pv-binding" . 1) ("dolist-carefully" . 1) ("bind-args" . 1) ("with-dfun-wrappers" . 3) ("simple-lexical-method-functions" . 1) ("with-pcl-lock" . 0) ("doplist" . 2) ("with-type-checked" . 1) ("pv-binding1" . 1) ("dotimes-fixnum" . 1) ("dfun-miss" . 1) ("fast-lexical-method-functions" . 1) ("bind-simple-lexical-method-functions" . 1) ("with-alien" . 1) ("define-alien-callback" . 3) ("alien-lambda" . 2) ("with-auxiliary-alien-types" . 1) ("define-instruction-macro" . 2) ("without-scheduling" . 1) ("assemble" . 1) ("do-sset-elements" . 1) ("note-dependencies" . 1) ("with-modified-segment-index-and-posn" . 1) ("sc-case" . 1) ("deftransform" . 2) ("define-vop" . 1) ("with-source-location" . 1) ("define-source-transform" . 2) ("defoptimizer" . 2) ("defknown" . 4) ("source-transform-lambda" . 1) ("define-move-fun" . 3) ("define-assembly-routine" . 2) ("def-ir1-translator" . 2) ("with-component-last-block" . 1) ("define-internal-pcl-function-name-syntax" . 1) ("do-nodes-carefully" . 1) ("do-ir2-blocks" . 1) ("with-fun-name-leaf" . 1) ("do-blocks" . 1) ("with-ir1-namespace" . 0) ("with-compilation-values" . 0) ("do-forms-from-info" . 1) ("with-compiler-io-syntax" . 0) ("do-packed-tns" . 1) ("do-live-tns" . 1) ("define-modular-fun-optimizer" . 2) ("do-eql-vars" . 1) ("do-nodes" . 1) ("do-sc-pairs" . 1) ("do-physenv-ir2-blocks" . 1) ("do-blocks-backwards" . 1) ("do-nodes-backwards" . 1) ("processing-decls" . 1) ("do-uses" . 1) ("with-fop-stack" . 1) ("expand-bind-defaults" . 2) ("def-format-directive" . 2) ("def-complex-format-directive" . 2) ("with-new-session" . 1) ("with-mutex" . 1) ("with-recursive-lock" . 1) ("with-spinlock" . 1) ("with-session-lock" . 1) ("with-system-mutex" . 1) ("with-all-threads-lock" . 0) ("with-recursive-spinlock" . 1) ("with-interruptions-lock" . 1) ("with-recursive-system-spinlock" . 1) ("with-system-spinlock" . 1) ("with-pretty-stream" . 1) ("with-sequence-iterator" . 2) ("dosequence" . 1) ("with-sequence-iterator-functions" . 2) ("with-new-definition-in-environment" . 1) ("with-augmented-environment" . 1) ("walker-environment-bind" . 1) ("program-destructuring-bind" . 2) ("with-process-times" . 1) ("with-sysfun" . 1) ("with-funcname" . 1) ("with-loop-list-collection-head" . 1) ("with-minimax-value" . 1) ("with-compilation-hooks" . 1) ("with-struct" . 2) ("with-debootstrapping" . 0) ("with-slime-output-stream" . 1) ("defimplementation" . 2) ("defsystem" . 1) ("with-hostent" . 2) ("with-wsa-data" . 2) ("with-sockaddr-in" . 2) ("with-array-data" . 1) ("with-protoent" . 2) ("with-in-addr" . 2) ("with-vector-sap" . 1) ("with-sockaddr-for" . 1) ("with-alien-stat" . 2) ("with-dirent" . 2) ("define-entry-point" . 2) ("with-growing-c-string" . 1) ("define-designator" . 2) ("with-retry-restart" . 1) ("with-describe-settings" . 1) ("with-buffer-syntax" . 1) ("with-temp-package" . 1) ("without-interrupts" . 0) ("with-thread-description" . 1) ("without-slime-interrupts" . 0) ("with-io-redirection" . 1) ("with-panic-handler" . 1) ("with-slime-interrupts" . 0) ("defslimefun" . 2) ("with-top-level-restart" . 1) ("with-bindings" . 1) ("with-connection" . 1) ("do-symbols*" . 1) ("with-struct*" . 1) ("with-swank-error-handler" . 1))) WRITE: (:indentation-update (("without-package-locks" . 0) ("with-timeout" . 1) ("define-source-context" . 2) ("with-unlocked-packages" . 1) ("with-locked-hash-table" . 1) ("with-unique-names" . 1) ("defun-cached" . 2) ("with-sane-io-syntax" . 0) ("once-only" . 1) ("with-rebound-io-syntax" . 0) ("defmacro-mundanely" . 2) ("awhen" . 1) ("define-function-name-syntax" . 2) ("dohash" . 1) ("named-lambda" . 2) ("dovector" . 1) ("binding*" . 1) ("with-float-traps-masked" . 1) ("named-let" . 2) ("do-info" . 1) ("prepare-for-fast-read-byte" . 1) ("dx-flet" . 1) ("prepare-for-fast-read-char" . 1) ("dx-let" . 1) ("collect" . 1) ("maybe-pseudo-atomic" . 1) ("with-cycle-counter" . 0) ("with-empty-tn@fp-top" . 1) ("with-tn@fp-top" . 1) ("with-fixed-allocation" . 1) ("descend-into" . 1) ("with-single-package-locked-error" . 1) ("with-circularity-detection" . 1) ("number-dispatch" . 1) ("with-local-interrupts" . 0) ("allow-with-interrupts" . 0) ("without-gcing" . 0) ("with-deadline" . 1) ("without-interrupts" . 0) ("with-interrupts" . 0) ("with-pinned-objects" . 1) ("with-active-processes-lock" . 1) ("def-output-routines" . 1) ("with-default-decoding-replacement" . 1) ("with-c-strvec" . 1) ("with-stepping-enabled" . 0) ("define-sequence-traverser" . 2) ("output-wrapper" . 1) ("string-dispatch" . 2) ("with-finalizer-store-lock" . 0) ("with-pathname" . 1) ("with-available-buffers-lock" . 1) ("with-stepping-disabled" . 0) ("with-host" . 1) ("with-symbol" . 1) ("with-push-char" . 1) ("lambda-with-lexenv" . 3) ("with-hash-table-locks" . 1) ("def-output-routines/variable-width" . 1) ("with-reader" . 1) ("input-wrapper" . 1) ("with-packages" . 1) ("with-standard-replacement-character" . 0) ("with-native-pathname" . 1) ("with-descriptor-handlers" . 0) ("input-wrapper/variable-width" . 1) ("output-wrapper/variable-width" . 1) ("with-concurrent-access-check" . 2) ("with-scheduler-lock" . 1) ("handling-end-of-the-world" . 0) ("do-debug-block-locations" . 1) ("do-debug-fun-vars" . 1) ("do-debug-fun-blocks" . 1) ("maybe-with-pinned-objects" . 2) ("define-alien-type-translator" . 2) ("bind-fast-lexical-method-functions" . 1) ("pv-binding" . 1) ("dolist-carefully" . 1) ("bind-args" . 1) ("with-dfun-wrappers" . 3) ("simple-lexical-method-functions" . 1) ("with-pcl-lock" . 0) ("doplist" . 2) ("with-type-checked" . 1) ("pv-binding1" . 1) ("dotimes-fixnum" . 1) ("dfun-miss" . 1) ("fast-lexical-method-functions" . 1) ("bind-simple-lexical-method-functions" . 1) ("with-alien" . 1) ("define-alien-callback" . 3) ("alien-lambda" . 2) ("with-auxiliary-alien-types" . 1) ("define-instruction-macro" . 2) ("without-scheduling" . 1) ("assemble" . 1) ("do-sset-elements" . 1) ("note-dependencies" . 1) ("with-modified-segment-index-and-posn" . 1) ("sc-case" . 1) ("deftransform" . 2) ("define-vop" . 1) ("with-source-location" . 1) ("define-source-transform" . 2) ("defoptimizer" . 2) ("defknown" . 4) ("source-transform-lambda" . 1) ("define-move-fun" . 3) ("define-assembly-routine" . 2) ("def-ir1-translator" . 2) ("with-component-last-block" . 1) ("define-internal-pcl-function-name-syntax" . 1) ("do-nodes-carefully" . 1) ("do-ir2-blocks" . 1) ("with-fun-name-leaf" . 1) ("do-blocks" . 1) ("with-ir1-namespace" . 0) ("with-compilation-values" . 0) ("do-forms-from-info" . 1) ("with-compiler-io-syntax" . 0) ("do-packed-tns" . 1) ("do-live-tns" . 1) ("define-modular-fun-optimizer" . 2) ("do-eql-vars" . 1) ("do-nodes" . 1) ("do-sc-pairs" . 1) ("do-physenv-ir2-blocks" . 1) ("do-blocks-backwards" . 1) ("do-nodes-backwards" . 1) ("processing-decls" . 1) ("do-uses" . 1) ("with-fop-stack" . 1) ("expand-bind-defaults" . 2) ("def-format-directive" . 2) ("def-complex-format-directive" . 2) ("with-new-session" . 1) ("with-mutex" . 1) ("with-recursive-lock" . 1) ("with-spinlock" . 1) ("with-session-lock" . 1) ("with-system-mutex" . 1) ("with-all-threads-lock" . 0) ("with-recursive-spinlock" . 1) ("with-interruptions-lock" . 1) ("with-recursive-system-spinlock" . 1) ("with-system-spinlock" . 1) ("with-pretty-stream" . 1) ("with-sequence-iterator" . 2) ("dosequence" . 1) ("with-sequence-iterator-functions" . 2) ("with-new-definition-in-environment" . 1) ("with-augmented-environment" . 1) ("walker-environment-bind" . 1) ("program-destructuring-bind" . 2) ("with-process-times" . 1) ("with-sysfun" . 1) ("with-funcname" . 1) ("with-loop-list-collection-head" . 1) ("with-minimax-value" . 1) ("with-compilation-hooks" . 1) ("with-struct" . 2) ("with-debootstrapping" . 0) ("with-slime-output-stream" . 1) ("defimplementation" . 2) ("defsystem" . 1) ("with-hostent" . 2) ("with-wsa-data" . 2) ("with-sockaddr-in" . 2) ("with-array-data" . 1) ("with-protoent" . 2) ("with-in-addr" . 2) ("with-vector-sap" . 1) ("with-sockaddr-for" . 1) ("with-alien-stat" . 2) ("with-dirent" . 2) ("define-entry-point" . 2) ("with-growing-c-string" . 1) ("define-designator" . 2) ("with-retry-restart" . 1) ("with-describe-settings" . 1) ("with-buffer-syntax" . 1) ("with-temp-package" . 1) ("without-interrupts" . 0) ("with-thread-description" . 1) ("without-slime-interrupts" . 0) ("with-io-redirection" . 1) ("with-panic-handler" . 1) ("with-slime-interrupts" . 0) ("defslimefun" . 2) ("with-top-level-restart" . 1) ("with-bindings" . 1) ("with-connection" . 1) ("do-symbols*" . 1) ("with-struct*" . 1) ("with-swank-error-handler" . 1))) dispatch-event: (:RETURN 0 (:OK (:PID 9792 :STYLE NIL :LISP-IMPLEMENTATION (:TYPE "SBCL" :NAME "sbcl" :VERSION "1.0.19") :MACHINE (:INSTANCE "HELLSHEAVEN" :TYPE "X86" :VERSION NIL) :FEATURES (:ASDF :ANSI-CL :COMMON-LISP :SBCL :SB-DOC :SB-TEST :SB-LDB :SB-PACKAGE-LOCKS :SB-UNICODE :SB-EVAL :SB-SOURCE-LOCATIONS :IEEE-FLOATING-POINT :X86 :WIN32 :GENCGC :STACK-GROWS-DOWNWARD-NOT-UPWARD :C-STACK-IS-CONTROL-STACK :COMPARE-AND-SWAP-VOPS :UNWIND-TO-FRAME-AND-CALL-VOP :RAW-INSTANCE-INIT-VOPS :STACK-ALLOCATABLE-CLOSURES :ALIEN-CALLBACKS :CYCLE-COUNTER :LINKAGE-TABLE :OS-PROVIDES-DLOPEN :OS-PROVIDES-PUTWC) :MODULES ("SB-CLTL2" "SB-POSIX" "SB-INTROSPECT" "SB-BSD-SOCKETS" "SB-GROVEL" "ASDF") :PACKAGE (:NAME "COMMON-LISP-USER" :PROMPT "CL-USER") :VERSION "2008-12-02")) 1) WRITE: (:return (:ok (:pid 9792 :style nil :lisp-implementation (:type "SBCL" :name "sbcl" :version "1.0.19") :machine (:instance "HELLSHEAVEN" :type "X86" :version nil) :features (:asdf :ansi-cl :common-lisp :sbcl :sb-doc :sb-test :sb-ldb :sb-package-locks :sb-unicode :sb-eval :sb-source-locations :ieee-floating-point :x86 :win32 :gencgc :stack-grows-downward-not-upward :c-stack-is-control-stack :compare-and-swap-vops :unwind-to-frame-and-call-vop :raw-instance-init-vops :stack-allocatable-closures :alien-callbacks :cycle-counter :linkage-table :os-provides-dlopen :os-provides-putwc) :modules ("SB-CLTL2" "SB-POSIX" "SB-INTROSPECT" "SB-BSD-SOCKETS" "SB-GROVEL" "ASDF") :package (:name "COMMON-LISP-USER" :prompt "CL-USER") :version "2008-12-02")) 1) wait-for-event: (:EMACS-REX . SWANK::_) NIL wait-for-event/event-loop: (:EMACS-REX . SWANK::_) NIL pre wait-for-input after wait-for-input READ: "(:emacs-rex (swank:listener-eval "(error 'foo) ") "COMMON-LISP-USER" :repl-thread 2) " dispatch-event: (:EMACS-REX (SWANK:LISTENER-EVAL "(error 'foo) ") "COMMON-LISP-USER" :REPL-THREAD 2) send-event: 0 (:EMACS-REX (SWANK:LISTENER-EVAL "(error 'foo) ") "COMMON-LISP-USER" 2) -wait-for-event/event-loop: (:EMACS-REX (SWANK:LISTENER-EVAL "(error 'foo) ") "COMMON-LISP-USER" 2) dispatch-event: (:DEBUG 0 1 ("Bad type argument: FOO" " [Condition of type SIMPLE-TYPE-ERROR]" NIL) (("RETRY" "Retry SLIME REPL evaluation request.") ("ABORT" "Return to SLIME's top level.") ("CLOSE-CONNECTION" "Close SLIME connection") ("ABORT" "Exit debugger, returning to top level.")) ((0 "(MAKE-CONDITION FOO)[:EXTERNAL]") (1 "(ERROR FOO)[:EXTERNAL]") (2 "(SB-INT:SIMPLE-EVAL-IN-LEXENV (ERROR 'FOO) #<NULL-LEXENV>)") (3 "(SWANK::EVAL-REGION "(error 'foo)\n")") (4 "((LAMBDA ()))") (5 "(SWANK::TRACK-PACKAGE #<CLOSURE (LAMBDA #) {23D4B30D}>)") (6 "(SWANK::CALL-WITH-RETRY-RESTART "Retry SLIME REPL evaluation request." #<CLOSURE (LAMBDA #) {23D4B29D}>)") (7 "(SWANK::CALL-WITH-BUFFER-SYNTAX NIL #<CLOSURE (LAMBDA #) {23D4B285}>)") (8 "(SWANK::REPL-EVAL "(error 'foo)\n")") (9 "(SB-INT:SIMPLE-EVAL-IN-LEXENV (SWANK:LISTENER-EVAL "(error 'foo)\n") #<NULL-LEXENV>)") (10 "(SWANK::EVAL-FOR-EMACS (SWANK:LISTENER-EVAL "(error 'foo)\n") "COMMON-LISP-USER" 2)") (11 "(SWANK::PROCESS-REQUESTS NIL)") (12 "((LAMBDA ()))") (13 "((FLET #:FORM-FUN1339))") (14 "((LAMBDA (SWANK-BACKEND::HOOK SWANK-BACKEND::FUN)) #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK> #<CLOSURE (LAMBDA #) {23CCC4AD}>)") (15 "(SWANK::CALL-WITH-REDIRECTED-IO #<SWANK::CONNECTION {23BE7A81}> #<CLOSURE (LAMBDA #) {23CCC4BD}>)") (16 "(SWANK::CALL-WITH-CONNECTION #<SWANK::CONNECTION {23BE7A81}> #<CLOSURE (LAMBDA #) {23CCC4AD}>)") (17 "(SWANK::HANDLE-REQUESTS #<SWANK::CONNECTION {23BE7A81}> NIL)") (18 "((LAMBDA ()))") (19 "((LAMBDA (SWANK-BACKEND::HANDLER FUNCTION)) #<FUNCTION (LAMBDA #) {239C4A95}> #<CLOSURE (LAMBDA #) {23CCC445}>)")) (2)) WRITE: (:debug 0 1 ("Bad type argument: FOO" " [Condition of type SIMPLE-TYPE-ERROR]" nil) (("RETRY" "Retry SLIME REPL evaluation request.") ("ABORT" "Return to SLIME's top level.") ("CLOSE-CONNECTION" "Close SLIME connection") ("ABORT" "Exit debugger, returning to top level.")) ((0 "(MAKE-CONDITION FOO)[:EXTERNAL]") (1 "(ERROR FOO)[:EXTERNAL]") (2 "(SB-INT:SIMPLE-EVAL-IN-LEXENV (ERROR 'FOO) #<NULL-LEXENV>)") (3 "(SWANK::EVAL-REGION "(error 'foo)\n")") (4 "((LAMBDA ()))") (5 "(SWANK::TRACK-PACKAGE #<CLOSURE (LAMBDA #) {23D4B30D}>)") (6 "(SWANK::CALL-WITH-RETRY-RESTART "Retry SLIME REPL evaluation request." #<CLOSURE (LAMBDA #) {23D4B29D}>)") (7 "(SWANK::CALL-WITH-BUFFER-SYNTAX NIL #<CLOSURE (LAMBDA #) {23D4B285}>)") (8 "(SWANK::REPL-EVAL "(error 'foo)\n")") (9 "(SB-INT:SIMPLE-EVAL-IN-LEXENV (SWANK:LISTENER-EVAL "(error 'foo)\n") #<NULL-LEXENV>)") (10 "(SWANK::EVAL-FOR-EMACS (SWANK:LISTENER-EVAL "(error 'foo)\n") "COMMON-LISP-USER" 2)") (11 "(SWANK::PROCESS-REQUESTS NIL)") (12 "((LAMBDA ()))") (13 "((FLET #:FORM-FUN1339))") (14 "((LAMBDA (SWANK-BACKEND::HOOK SWANK-BACKEND::FUN)) #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK> #<CLOSURE (LAMBDA #) {23CCC4AD}>)") (15 "(SWANK::CALL-WITH-REDIRECTED-IO #<SWANK::CONNECTION {23BE7A81}> #<CLOSURE (LAMBDA #) {23CCC4BD}>)") (16 "(SWANK::CALL-WITH-CONNECTION #<SWANK::CONNECTION {23BE7A81}> #<CLOSURE (LAMBDA #) {23CCC4AD}>)") (17 "(SWANK::HANDLE-REQUESTS #<SWANK::CONNECTION {23BE7A81}> NIL)") (18 "((LAMBDA ()))") (19 "((LAMBDA (SWANK-BACKEND::HANDLER FUNCTION)) #<FUNCTION (LAMBDA #) {239C4A95}> #<CLOSURE (LAMBDA #) {23CCC445}>)")) (2)) dispatch-event: (:DEBUG-ACTIVATE 0 1 NIL) WRITE: (:debug-activate 0 1 nil) wait-for-event: (COMMON-LISP:OR (:EMACS-REX . SWANK::_) (:SLDB-RETURN 2)) NIL wait-for-event/event-loop: (COMMON-LISP:OR (:EMACS-REX . SWANK::_) (:SLDB-RETURN 2)) NIL pre wait-for-input after wait-for-input READ: "(:emacs-rex (swank:throw-to-toplevel) nil 0 3) " dispatch-event: (:EMACS-REX (SWANK:THROW-TO-TOPLEVEL) NIL 0 3) send-event: 0 (:EMACS-REX (SWANK:THROW-TO-TOPLEVEL) NIL 3) -wait-for-event/event-loop: (:EMACS-REX (SWANK:THROW-TO-TOPLEVEL) NIL 3) dispatch-event: (:RETURN 0 (:ABORT) 3) WRITE: (:return (:abort) 3) dispatch-event: (:DEBUG-RETURN 0 1 NIL) WRITE: (:debug-return 0 1 nil) wait-for-event: (:SLDB-RETURN 2) T wait-for-event/event-loop: (:SLDB-RETURN 2) T pre wait-for-input
* Thomas Karolski [2008-12-05 22:04+0100] writes:
Helmut Eller schrieb:
Does READ-CHAR-NO-HANG work properly on socket streams? There is a comment in HANDLE-LISTEN (in win32.lisp)
Not sure - how could I test that?
For example with:
(read-char-no-hang (let ((socket (make-instance 'sb-bsd-sockets:inet-socket :type :stream :protocol :tcp))) (setf (sb-bsd-sockets:sockopt-reuse-address socket) t) (sb-bsd-sockets:socket-bind socket #(0 0 0 0) 5000) (sb-bsd-sockets:socket-listen socket 5) (unwind-protect (sb-bsd-sockets:socket-make-stream (sb-bsd-sockets:socket-accept socket) :output t :input t :element-type 'character) (sb-bsd-sockets:socket-close socket))))
This creates a socket, waits for someone to connect, and calls read-char-no-hang on the new stream. Start this in SBCL and execute "telnet localhost 5000" in a shell. read-char-no-hang should return nil as soon as the telnet client connects.
If it just waits, then you can type something into the telnet window and the first char should appear on the SBCL side. In this case read-char-no-hang doesn't work properly, it works like the ordinary read-char.
I think it should work on gray streams, but I'm not sure what slime is using.
In this situation it's a fd-stream and the fd is a socket.
I suspect that WAIT-FOR-EVENT/EVENT-LOOP (in swank.lisp) blocks even though the timeout argument is t. To see if that's actually the case, you could generate some debug output in WAIT-FOR-EVENT/EVENT-LOOP. It's the easiest if you use LOG-EVENT for that.
Changed wait-for-event/event-loop into:
(defun wait-for-event/event-loop (pattern timeout) (assert (or (not timeout) (eq timeout t))) (log-event "wait-for-event/event-loop: ~s ~s~%" pattern timeout) (let ((r (loop (check-slime-interrupts) (let ((event (poll-for-event pattern))) (when event (return (car event)))) (log-event "pre wait-for-input~%") (let ((events-enqueued *events-enqueued*) (ready (wait-for-input (list (current-socket-io)) timeout))) (log-event "after wait-for-input~%") (cond ((and timeout (not ready)) (return (values nil t))) ((or (/= events-enqueued *events-enqueued*) (eq ready :interrupt)) ;; rescan event queue, interrupts may enqueue new events ) (t (assert (equal ready (list (current-socket-io)))) (dispatch-event (decode-message (current-socket-io))))))))) (log-event "-wait-for-event/event-loop: ~s~%" r) r))
I attached the new *inferior-lisp* buffer. The last message is "pre wait-for-input", which indicates that its hanging inside wait-for-input. I also tried putting a log-event before read-char-no-hang inside wait-for-input, but that didn't seem to get logged for some reason.
wait-for-input is in swank-backend.lisp and in swank-sbcl.lisp. Perhaps you added it in the wrong file. Those are also in different packages so, you probably need something like (funcall (read-from-string "swank::log-event") ...)
Seeing this I guess you're right. Is there any way to work around this issue? - it does work for earlier calls to wait-for-input after all (though those all don't have a timeout).
The best solution would be to fix HANDLE-LISTEN, but I don't know how to do that.
As a workaround you can probably replace (wait-for-event `(:sldb-return ,(1+ level)) t) ; clean event-queue in sldb-loop with: (poll-for-event `(:sldb-return ,(1+ level)))
Helmut.
Helmut Eller schrieb:
For example with:
(read-char-no-hang (let ((socket (make-instance 'sb-bsd-sockets:inet-socket :type :stream :protocol :tcp))) (setf (sb-bsd-sockets:sockopt-reuse-address socket) t) (sb-bsd-sockets:socket-bind socket #(0 0 0 0) 5000) (sb-bsd-sockets:socket-listen socket 5) (unwind-protect (sb-bsd-sockets:socket-make-stream (sb-bsd-sockets:socket-accept socket) :output t :input t :element-type 'character) (sb-bsd-sockets:socket-close socket))))
This creates a socket, waits for someone to connect, and calls read-char-no-hang on the new stream. Start this in SBCL and execute "telnet localhost 5000" in a shell. read-char-no-hang should return nil as soon as the telnet client connects.
If it just waits, then you can type something into the telnet window and the first char should appear on the SBCL side. In this case read-char-no-hang doesn't work properly, it works like the ordinary read-char.
You're right, it does not return nil as soon as someone connects. It does however return the first char as soon as I type something into the first window.
The best solution would be to fix HANDLE-LISTEN, but I don't know how to do that.
As a workaround you can probably replace (wait-for-event `(:sldb-return ,(1+ level)) t) ; clean event-queue in sldb-loop with: (poll-for-event `(:sldb-return ,(1+ level))
That actually solved the problem! Now given that the problem seems to be with sbcl's HANDLE-LISTEN, I guess I'll check out their mailing list.
Many thanks there, Thomas K.