From: Tamas K P. <tk...@gm...> - 2011-04-05 13:41:59
|
Hi, I am debugging a library with an FFI which sometimes segfaults because of memory problems (not a problem with SBCL, but bugs in the interface I am writing). Then I have to restart the lisp process, load everything, etc, which is a bit cumbersome. I thought of saving a lisp image at a "safe" point (ie before testing the buggy functions) and reloading it, but I could not figure out how to do this in SLIME. The reloading looks easy with (setq slime-lisp-implementations '((my-image ("sbcl" "--core /home/tpapp/my.core")))) in my .emacs, but when I want to use CL-USER> (sb-ext:save-lisp-and-die #P"/home/tpapp/my.core") SBCL complains about multiple threads -- I guess this is SLIME/swank, I don't use threads in my code. I looked at the docs, which told me that I can take care of this with SB-EXT:*SAVE-HOOKS*, but I don't know how to go about this. I wonder if someone could give me details/examples on how to establish a workflow of saving and using images with SLIME & SBCL. Thanks, Tamas PS.: If that matters, I am using SBCL 1.0.45 (but I can upgrade if necessary) and SLIME 2011-03-13. |