[slime-devel] Some small fixes/enhancements for swank-cmucl

Stas Boukarev stassats at gmail.com
Sun Aug 29 00:01:04 UTC 2010


Raymond Toy <toy.raymond at gmail.com> writes:

> Here are a couple of small fixes.  They're not patches, but the changes
> are very simple.  If you want a patch, I can send that too.
>
> First, let swank-cmucl figure out where gdb is:
>
> (defvar *gdb-program-name*
>   (ext:enumerate-search-list (p "path:gdb")
>     (when (probe-file p)
>       (return p))))
>
> Also, disassemble-frame doesn't work on Mac OS X.  I guess the prompt is
> not quite right.  Here is replacement that works for me:
>
> (defun gdb-command (format-string &rest args)
>   (let ((str (gdb-exec (format nil
>                                "interpreter-exec mi2 \"attach ~d\"~%~
>                                 interpreter-exec console ~s~%detach"
>                                (getpid)
>                                (apply #'format nil format-string args))))
>         (prompt (format nil
>                         #-(and darwin x86) "~%^done~%(gdb) ~%"
>                         #+(and darwin x86)
> "~%^done,thread-id=\"1\"~%(gdb) ~%")))
>     (subseq str (+ (or (search prompt str) 0) (length prompt)))))
>
> Not sure about the (or (search prompt str) 0) part, but it might be
> better to suck in the whole string than to error out when search return NIL.
>
Committed, thanks.

-- 
With Best Regards, Stas.




More information about the slime-devel mailing list