[slime-devel] Re: [Sbcl-devel] "Cannot find source location" Error

Jean-Philippe Barrette-LaPierre jpb at rrette.com
Thu Dec 13 02:16:08 UTC 2007


On 12-Dec-07, at 7:23 PM, Juho Snellman wrote:

> Jean-Philippe Barrette-LaPierre <jpb at rrette.com> writes:
>
>> I'm using sbcl-1.0.12.25-x86-darwin took from http://sbcl.static.net/
>> builds/.
>> When I evaluate the following code:
>>
>> (declaim (optimize (speed 0) (space 0) (compilation-speed 0)  
>> (debug 3)))
>>
>> (defun test ()
>>    (break))
>>
>> (test)
>>
>> The "source" command within the debugger returns this:
>> "Cannot find source localtion for #<COMPILED-CODE-LOCATION (SB-
>> C::VARARGS-ENTRY BREAK)>"
>>
>> Is it a known problem? What am I doing wrong?
>
> You're trying to show the source of BREAK. Assuming your goal was to
> show the location of the *call* to BREAK, you need to navigate to the
> debugger frame for TEST (with up/down) before using the command.
>

Sorry, the source of the problem originated with SLIME usage. I tried  
to send
a quick example that wouldn't rely on SLIME behavior and I didn't  
checked
properly what I was doing.

You're right sbcl behaves as it should in that case. It seems in fact  
to be
a problem with SLIME. It seems someone has already sent an email
about this problem:

http://common-lisp.net/pipermail/slime-devel/2007-November/006761.html

== little part of message ==
I start SBCL by M-m M-x slime

SLIME does start up, I get a lisp prompt and it seems to behave
normally. However, the connection between SBCL and SLIME is rather
shaky.
At some point during working with SBCL, I lose the function parameter
info, I also can't break running code then.
== end of part of message ==

If I load the test file (code above) within slime and I do:
M-x slime
M-x slime-compile-and-load-file

When I enter in the debugger, the "v" command for any of my own stack  
frame,
it prints:

#<SB-DI::COMPILED-DEBUG-FUN TEST> has no debug-block information.

or

#<SB-DI::COMPILED-DEBUG-FUN TEST> has no debug-block information.

However, if I compile back and load (slime-compile-and-load-file) the  
file,
without having specified the action to take for the debugger  
(Debugger is
still active), then I can see that the same messages are displayed  
for 1/10
of a second, but then "Evaluation aborted" is printed.

I'm using slime-2.0, but slime-cvs (took around the 2007-12-10) does the
  same thing.

Here's the *slime-event* buffer:
(:emacs-rex
  (swank:connection-info)
  nil t 1)
(:indentation-update
  (("with-locked-hash-table" . 1)
   ("with-unlocked-packages" . 1)
   ("with-timeout" . 1)
   ("define-source-context" . 2)
   ("without-package-locks" . 0)
   ("with-unique-names" . 1)
   ("with-float-traps-masked" . 1)
   ("awhen" . 1)
   ("defun-cached" . 2)
   ("prepare-for-fast-read-char" . 1)
   ("dx-flet" . 1)
   ("once-only" . 1)
   ("define-function-name-syntax" . 2)
   ("do-info" . 1)
   ("dx-let" . 1)
   ("dovector" . 1)
   ("collect" . 1)
   ("named-lambda" . 2)
   ("with-rebound-io-syntax" . 0)
   ("prepare-for-fast-read-byte" . 1)
   ...))
(:return
  (:ok
   (:pid 17387 :style :fd-handler :lisp-implementation
	(:type "SBCL" :name "sbcl" :version "1.0.12.25")
	:machine
	(:instance "jean-philippe-barrette-lapierres-computer.local" :type  
"X86" :version nil)
	:features
	(:sb-bsd-sockets-addrinfo :asdf :ansi-cl :common-lisp :sbcl :sb- 
doc :sb-test :sb-ldb :sb-package-locks :sb-unicode :sb-eval :sb- 
source-locations :ieee-floating-point :x86 :unix :mach- 
o :bsd :darwin :mach-exception-handler :sb-lutex ...)
	:package
	(:name "COMMON-LISP-USER" :prompt "CL-USER")))
  1)
(:emacs-rex
  (swank:compile-file-for-emacs "/Users/jpbarrette/Projects/ 
MakeGrapher/test.lisp" t)
  nil t 2)
(:write-string "\n")
(:write-string "; compiling file \"/Users/jpbarrette/Projects/ 
MakeGrapher/test.lisp\" (written 12 DEC 2007 09:08:11 PM):\n\n; / 
Users/jpbarrette/Projects/MakeGrapher/test.fasl written\n;  
compilation finished in 0:00:00\ntest2: a 1\ntest: b 1\n")
(:debug 0 1
	("break" "   [Condition of type SIMPLE-CONDITION]" nil nil)
	(("CONTINUE" "Return from BREAK.")
	 ("ABORT" "Abort SLIME compilation.")
	 ("ABORT-REQUEST" "Abort handling SLIME request.")
	 ("ABORT" "Exit debugger, returning to top level."))
	((0 "(BREAK \"break\")")
	 (1 "(TEST 1)")
	 (2 "(TEST2 1)")
	 (3 "(SB-FASL::LOAD-FASL-GROUP #<SB-SYS:FD-STREAM for \"file /Users/ 
jpbarrette/Projects/MakeGrapher/test.fasl\" {11B487B1}>)")
	 (4 "((FLET SB-THREAD::WITH-RECURSIVE-LOCK-THUNK))")
	 (5 "(SB-FASL::LOAD-AS-FASL #<SB-SYS:FD-STREAM for \"file /Users/ 
jpbarrette/Projects/MakeGrapher/test.fasl\" {11B487B1}> NIL  
#<unavailable argument>)")
	 (6 "(SB-FASL::INTERNAL-LOAD #P\"/Users/jpbarrette/Projects/ 
MakeGrapher/test.fasl\" #P\"/Users/jpbarrette/Projects/MakeGrapher/ 
test.fasl\" :ERROR NIL NIL :BINARY NIL)")
	 (7 "(SB-FASL::INTERNAL-LOAD #P\"/Users/jpbarrette/Projects/ 
MakeGrapher/test.fasl\" #P\"/Users/jpbarrette/Projects/MakeGrapher/ 
test.fasl\" :ERROR NIL NIL NIL :DEFAULT)")
	 (8 "(LOAD #P\"/Users/jpbarrette/Projects/MakeGrapher/test.fasl\")")
	 (9 "((SB-PCL::FAST-METHOD SWANK-BACKEND:SWANK-COMPILE-FILE (T #1= 
\"#<...>\" . #1#)) #<unused argument> #<unused argument> \"/Users/ 
jpbarrette/Projects/MakeGrapher/test.lisp\" T NIL)")
	 (10 "(SWANK::MEASURE-TIME-INTERVAL #<CLOSURE (LAMBDA NIL) {119AB815} 
 >)")
	 (11 "(SWANK::SWANK-COMPILER #<CLOSURE (LAMBDA NIL) {119AB815}>)")
	 (12 "((LAMBDA NIL))")
	 (13 "((SB-PCL::FAST-METHOD SWANK-BACKEND:CALL-WITH-SYNTAX-HOOKS  
(T)) #<unused argument> #<unused argument> #<CLOSURE (LAMBDA NIL)  
{119A6DC5}>)")
	 (14 "(SWANK::CALL-WITH-BUFFER-SYNTAX #<CLOSURE (LAMBDA NIL)  
{119A6DC5}>)")
	 (15 "(SB-INT:SIMPLE-EVAL-IN-LEXENV (SWANK:COMPILE-FILE-FOR-EMACS \"/ 
Users/jpbarrette/Projects/MakeGrapher/test.lisp\" T) #<NULL-LEXENV>)")
	 (16 "((LAMBDA NIL))")
	 (17 "((SB-PCL::FAST-METHOD SWANK-BACKEND:CALL-WITH-DEBUGGER-HOOK (T  
T)) #<unused argument> #<unused argument> #<FUNCTION SWANK:SWANK- 
DEBUGGER-HOOK> #<CLOSURE (LAMBDA NIL) {119A6C8D}>)")
	 (18 "((LAMBDA NIL))")
	 (19 "((SB-PCL::FAST-METHOD SWANK-BACKEND:CALL-WITH-DEBUGGER-HOOK (T  
T)) #<unused argument> #<unused argument> #<FUNCTION SWANK:SWANK- 
DEBUGGER-HOOK> #<FUNCTION (LAMBDA NIL) {11F7E895}>)"))
	(2))
(:debug-activate 0 1)
(:emacs-rex
  (swank:frame-source-location-for-emacs 1)
  nil 0 3)
(:return
  (:ok
   (:error "unhandled DEBUG-CONDITION:\n#<SB-DI::COMPILED-DEBUG-FUN  
TEST> has no debug-block information."))
  3)
(:debug-activate 0 1)
(:emacs-rex
  (swank:frame-source-location-for-emacs 2)
  nil 0 4)
(:return
  (:ok
   (:error "unhandled DEBUG-CONDITION:\n#<SB-DI::COMPILED-DEBUG-FUN  
TEST2> has no debug-block information."))
  4)
(:debug-activate 0 1)
(:emacs-rex
  (swank:compile-file-for-emacs "/Users/jpbarrette/Projects/ 
MakeGrapher/test.lisp" t)
  nil t 5)
(:write-string "; compiling file \"/Users/jpbarrette/Projects/ 
MakeGrapher/test.lisp\" (written 12 DEC 2007 09:08:11 PM):\n")
(:write-string "\n; /Users/jpbarrette/Projects/MakeGrapher/test.fasl  
written\n; compilation finished in 0:00:00\nSTYLE-WARNING: redefining  
TEST in DEFUN\nSTYLE-WARNING: redefining TEST2 in DEFUN\ntest2: a 1 
\ntest: b 1\n")
(:debug 0 2
	("break" "   [Condition of type SIMPLE-CONDITION]" nil nil)
	(("CONTINUE" "Return from BREAK.")
	 ("ABORT" "Abort SLIME compilation.")
	 ("ABORT" "Return to sldb level 1.")
	 ("CONTINUE" "Return from BREAK.")
	 ("ABORT" "Abort SLIME compilation.")
	 ("ABORT-REQUEST" "Abort handling SLIME request.")
	 ("ABORT" "Exit debugger, returning to top level."))
	((0 "(BREAK \"break\")")
	 (1 "(TEST 1)")
	 (2 "(TEST2 1)")
	 (3 "(SB-FASL::LOAD-FASL-GROUP #<SB-SYS:FD-STREAM for \"file /Users/ 
jpbarrette/Projects/MakeGrapher/test.fasl\" {11BFD571}>)")
	 (4 "((FLET SB-THREAD::WITH-RECURSIVE-LOCK-THUNK))")
	 (5 "(SB-FASL::LOAD-AS-FASL #<SB-SYS:FD-STREAM for \"file /Users/ 
jpbarrette/Projects/MakeGrapher/test.fasl\" {11BFD571}> NIL  
#<unavailable argument>)")
	 (6 "(SB-FASL::INTERNAL-LOAD #P\"/Users/jpbarrette/Projects/ 
MakeGrapher/test.fasl\" #P\"/Users/jpbarrette/Projects/MakeGrapher/ 
test.fasl\" :ERROR NIL NIL :BINARY NIL)")
	 (7 "(SB-FASL::INTERNAL-LOAD #P\"/Users/jpbarrette/Projects/ 
MakeGrapher/test.fasl\" #P\"/Users/jpbarrette/Projects/MakeGrapher/ 
test.fasl\" :ERROR NIL NIL NIL :DEFAULT)")
	 (8 "(LOAD #P\"/Users/jpbarrette/Projects/MakeGrapher/test.fasl\")")
	 (9 "((SB-PCL::FAST-METHOD SWANK-BACKEND:SWANK-COMPILE-FILE (T #1= 
\"#<...>\" . #1#)) #<unused argument> #<unused argument> \"/Users/ 
jpbarrette/Projects/MakeGrapher/test.lisp\" T NIL)")
	 (10 "(SWANK::MEASURE-TIME-INTERVAL #<CLOSURE (LAMBDA NIL) {11BC3FED} 
 >)")
	 (11 "(SWANK::SWANK-COMPILER #<CLOSURE (LAMBDA NIL) {11BC3FED}>)")
	 (12 "((LAMBDA NIL))")
	 (13 "((SB-PCL::FAST-METHOD SWANK-BACKEND:CALL-WITH-SYNTAX-HOOKS  
(T)) #<unused argument> #<unused argument> #<CLOSURE (LAMBDA NIL)  
{11BC3FCD}>)")
	 (14 "(SWANK::CALL-WITH-BUFFER-SYNTAX #<CLOSURE (LAMBDA NIL)  
{11BC3FCD}>)")
	 (15 "(SB-INT:SIMPLE-EVAL-IN-LEXENV (SWANK:COMPILE-FILE-FOR-EMACS \"/ 
Users/jpbarrette/Projects/MakeGrapher/test.lisp\" T) #<NULL-LEXENV>)")
	 (16 "((LAMBDA NIL))")
	 (17 "((SB-PCL::FAST-METHOD SWANK-BACKEND:CALL-WITH-DEBUGGER-HOOK (T  
T)) #<unused argument> #<unused argument> #<FUNCTION SWANK:SWANK- 
DEBUGGER-HOOK> #<CLOSURE (LAMBDA NIL) {11BC3E95}>)")
	 (18 "(SWANK::SLDB-LOOP 1)")
	 (19 "((SB-PCL::FAST-METHOD SWANK-BACKEND:CALL-WITH-DEBUGGING- 
ENVIRONMENT (T)) #<unused argument> #<unused argument> #<FUNCTION  
(LAMBDA NIL) {120F761D}>)"))
	(5 2))
(:debug-activate 0 2)
(:emacs-rex
  (swank:frame-source-location-for-emacs 1)
  nil 0 6)
(:debug-condition 0 "#<SB-DI::COMPILED-DEBUG-FUN TEST> has no debug- 
block information.")
(:return
  (:abort)
  6)
(:debug-activate 0 2)
(:emacs-rex
  (swank:frame-source-location-for-emacs 2)
  nil 0 7)
(:debug-condition 0 "#<SB-DI::COMPILED-DEBUG-FUN TEST2> has no debug- 
block information.")
(:return
  (:abort)
  7)
(:debug-activate 0 2)


> And frankly, I would suggest using the Slime debugger rather than the
> built-in one.
>
> -- 
> Juho Snellman
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/slime-devel/attachments/20071212/db8a6643/attachment.html>


More information about the slime-devel mailing list