[Openmcl-devel] How to get to the frame number in Slime's *inferior-lisp*
Bill St. Clair
wws at clozure.com
Thu Aug 18 04:44:05 PDT 2016
The frame number is best taken from a backtrace produced by :B. Here’s an
example:
? (defun foo (x)
(let ((y (+ x x)))
(if (> x 9) (break) (foo (1+ x))) y))
FOO
? (foo 1)
> Break: Break
> While executing: FOO, in process listener(1).
> Type :GO to continue, :POP to abort, :R for a list of available restarts.
> If continued: Return from BREAK.
> Type :? for other options.
1 > (:b :count 4)
(210668F8) : 0 (FOO 10) 141
(21066918) : 1 (FOO 9) 213
(21066938) : 2 (FOO 8) 213
(21066958) : 3 (FOO 7) 213
1 > (:arg x 0)
10
1 > (:local y 0)
20
1 > (:arg x 1)
9
1 > (:local y 1)
18
1 > (:arg x 3)
7
1 > (:local y 3)
14
:local and :arg are only useful if you know the names of the local
variables and args. You can show them by displaying the whole frame:
1 > (:f 2)
(21066938) : 2 (FOO 8) 213
(X)
X: 8
Y: 16
All of which is why I use Slime instead of the built-in CCL debugger. But
that’s hard to do while debugging the loading of Slime.
Bill
On Wed, Aug 17, 2016 at 10:28 PM, Mirko Vukovic <mirko.vukovic at gmail.com>
wrote:
> Hi,
>
> I am trying to debug CCL startup on Emacs' Slime (Windows 7). I inserted
> a breakpoint
> in swank's START-SERVER, and get the following output in the
> *inferior-lisp* buffer:
>
> Welcome to Clozure Common Lisp Version 1.11-r16635 (WindowsX8664)!
>
> CCL is developed and maintained by Clozure Associates. For more information
> about CCL visit http://ccl.clozure.com. To enquire about Clozure's
> Common Lisp
> consulting services e-mail info at clozure.com or visit
> http://www.clozure.com.
>
> ? ;Loading #P"c:/Users/977315/.emacs.d/elisp/slime/swank-loader.lisp"...
> > Break: start-server
> > While executing: SWANK:START-SERVER, in process listener(1).
> > Type :GO to continue, :POP to abort, :R for a list of available restarts.
> > If continued: Return from BREAK.
> > Type :? for other options.
> 1 >
>
> I'd like to examine the values of some variables using :LOCAL or :ARG.
> How do I refer to a variable? I tried 'foo, foo, "foo" (and the
> uppercase variants). I am using 0 as frame number as
> (:V 0 0) gave sensible results.
>
> Thanks,
>
> Mirko
>
>
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> https://lists.clozure.com/mailman/listinfo/openmcl-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20160818/17064c32/attachment.htm>
More information about the Openmcl-devel
mailing list