[slime-devel] Problem with debugger view source

Ryan Taylor ryanmail03 at rogers.com
Wed Sep 1 12:42:41 UTC 2010


Tail calls do not seem to be the problem;  the problem does not seem dependent on particular constructs, I have seen it happen in a variety of situations.  Here is an example that does not work.

Source file breaktest.lisp:
 (declaim (optimize (debug 3)))
 (defun foo (bar)
   (print bar)
   (print bar)
   (break)
   (print bar)))
 (defun foo-caller ()
   (foo "hello")
   (print "caller"))

From the REPL, I do:
  CL-USER> (load "/home/ryan/breaktest.lisp")
  T
  CL-USER> (foo-caller)

When I try sbdl-show-source on foo-caller or foo in the call stack, I get the errors mentioned in my previous email.

If I remove the debug optimization line, then I get errors like this with the new sbcl/slime versions:
  "Error: DEFINITION-SOURCE of function FOO did not contain meaningful information"



--- On Wed, 9/1/10, Helmut Eller <heller at common-lisp.net> wrote:

> From: Helmut Eller <heller at common-lisp.net>
> Subject: Re: [slime-devel] Problem with debugger view source
> To: slime-devel at common-lisp.net
> Date: Wednesday, September 1, 2010, 4:03 AM
> * Ryan Taylor [2010-09-01 03:29]
> writes:
> 
> > Hi,
> >
> > I cannot seem to get sldb-show-source to work using
> sbcl.
> >
> > I have tried with recent Ubuntu 10.04 packages:
> >  emacs 23.1+1-4ubuntu7
> >  slime 1:20090908-1
> >  sbcl 1:1.0.29.11-1ubuntu1
> >
> > I also tried a test machine where I downloaded:
> >  sbcl 1.0.42
> >  slime snapshot 2010-08-31
> >
> > On my test setup:  I wrote some trivial lisp code
> that included a (break) to start the debugger.  When
> running sldb-show-source on a frame from my source file, I
> get the following in my REPL output:
> >   "WARNING: inconsistent
> form-number-translations"
> > and I also get this in the emacs message echo area:
> >   "error in process filter: Beginning
> of buffer"
> >
> > Any idea why this is happening?
> 
> Hard to tell without seeing the function with the
> (break).  A problem
> may be that (break) is in tail position, so that the frame
> of your
> function is overwritten before the debugger is called and
> the debugger
> tries to find the source in some SBCL-internal function and
> the source
> of those might be inconsistent with debug info in the fasl
> file.
> Sometimes it helps to insert "(break) nil" to disable tail
> call
> optimization of BREAK.  [Arguably optimizing calls to
> BREAK counts as
> compiler bug.]
> 
> Helmut
> 
> 
> _______________________________________________
> slime-devel site list
> slime-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/slime-devel
> 





More information about the slime-devel mailing list