Rusty Robot
Rusty Robot

Reputation: 1355

Debugging Lisp & SLIME, error "Cannot find source location"

I am wrote the code with bugs.

Example:

(print (/ 1 0))

I am trying compile with C-c C-c. And catch the error with stack frame.

I want see line in the code where an error occured. Clicked 'v' on line in stack frame and catched error.

Error: Cannot find source location for: #<COMPILED-CODE-LOCATION 
(SB-C::VARARGS-ENTRY /)>  

How can I go to the line in my code?

Screenshot: enter image description here

Upvotes: 5

Views: 1373

Answers (2)

Ravi Desai
Ravi Desai

Reputation: 471

Do you have (proclaim '(optimize debug)) above that line somewhere? This function will ensure that your system has all the debugging data it can get.

Upvotes: 0

Vsevolod Dyomkin
Vsevolod Dyomkin

Reputation: 9451

As you can see from the error, the line you want to jump to, is somewhere in package SB-C, which is part of SBCL. If you don't have SBCL sources (you've installed a binary or deleted them), you should get them (relevant to your current SBCL version) and then link them up in .sbclrc like this (according to http://www.cliki.net/SLIME%20Features):

(setf (logical-pathname-translations "SYS") 
      '(("SYS:SRC;**;*.*.*" #P"/opt/sbcl/src/**/*.*")
        ("SYS:CONTRIB;**;*.*.*" #P"/opt/sbcl/contrib/**/*.*")))

Or just compile SBCL from source and it will know, where they are.

Upvotes: 6

Related Questions