As Luke knows, I've been having some problems with the latest cmucl cvs and slime. Whenever emacs connects to the swank server, cmucl immediately gets a bus error. (It shouldn't do that, but I don't know why.)
I think I finally tracked this down. In cmucl cvs, Helmut's source-location patches have been incorporated. However, swank-cmucl.lisp references some unknown functions such as file-source-location-tlf-number. There's also a bug in resolve-file-source-location:
(defun resolve-file-source-location (location) (let ((filename (c::file-source-location-pathname location)) (tlf-number (c::file-source-location-tlf-number location)) (form-number (c::file-source-location-tlf-number location)))
Presumably the tlf-number and form-number should not be the same; form-number should be from file-source-location-form-number.
Anyway, attached is a simple hack patch that fixes these issues. At least slime is now working again with cmucl cvs. :-1
Thanks for the great tool!
Ray
Index: swank-cmucl.lisp =================================================================== RCS file: /project/slime/cvsroot/slime/swank-cmucl.lisp,v retrieving revision 1.94 diff -u -r1.94 swank-cmucl.lisp --- swank-cmucl.lisp 6 Apr 2004 10:42:53 -0000 1.94 +++ swank-cmucl.lisp 17 Apr 2004 01:41:54 -0000 @@ -712,10 +712,22 @@ `(:function-name ,string))) (t (list :error (princ-to-string c))))))
+(defun file-source-location-tlf-number (location) + (nth-value 0 (decode-form-numbers (c::file-source-location-form-numbers location)))) + +(defun file-source-location-form-number (location) + (nth-value 1 (decode-form-numbers (c::file-source-location-form-numbers location)))) + +(defun source-location-tlf-number (location) + (nth-value 0 (decode-form-numbers (c::file-source-location-form-numbers location)))) + +(defun source-location-form-number (location) + (nth-value 1 (decode-form-numbers (c::file-source-location-form-numbers location)))) + (defun resolve-file-source-location (location) (let ((filename (c::file-source-location-pathname location)) - (tlf-number (c::file-source-location-tlf-number location)) - (form-number (c::file-source-location-tlf-number location))) + (tlf-number (file-source-location-tlf-number location)) + (form-number (file-source-location-form-number location))) (with-open-file (s filename) (let ((pos (form-number-stream-position tlf-number form-number s))) (make-location `(:file ,(unix-truename filename)) @@ -723,8 +735,8 @@
(defun resolve-source-location (location) (let ((info (c::source-location-user-info location)) - (tlf-number (c::source-location-tlf-number location)) - (form-number (c::source-location-tlf-number location))) + (tlf-number (source-location-tlf-number location)) + (form-number (source-location-form-number location))) ;; XXX duplication in frame-source-location (assert (info-from-emacs-buffer-p info)) (destructuring-bind (&key emacs-buffer emacs-buffer-string