From: lawrence m. <we...@gm...> - 2004-01-31 19:10:55
|
If I define a function, and then call it with two few arguments, I enter the debugger. An attempt to inspect the locals at the top of the stack then fails as shown below. (Note: This seems to look similar to Bugs 162 and 216.) | $ sbcl --noinform --userinit /dev/null --sysinit /dev/null | * (machine-type) | "X86" | * (lisp-implementation-version) | "0.8.7.33" | * *features* | (:SB-THREAD :SB-SHOW-ASSEM :SB-FUTEX | :SB-AFTER-XC-CORE :ANSI-CL | :COMMON-LISP :SBCL :UNIX :SB-DOC | :SB-TEST :IEEE-FLOATING-POINT :X86 | :LINUX :GENCGC :STACK-GROWS-DOWNWARD-NOT-UPWARD | :C-STACK-IS-CONTROL-STACK) | * (defun foo (x y) (values x y)) | FOO | * (foo t) | debugger invoked on a SB-INT:SIMPLE-PROGRAM-ERROR in thread 2669: | invalid number of arguments: 1 | You can type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL. | restarts (invokable by number or by possibly-abbreviated name): | 0: [ABORT ] Reduce debugger level (leaving debugger, returning to toplevel). | 1: [TOPLEVEL] Restart at toplevel READ/EVAL/PRINT loop. | ("XEP for FOO" #<error printing object>)[:EXTERNAL] | source: (SB-INT:NAMED-LAMBDA FOO (X Y) (BLOCK FOO (VALUES X Y))) | 0] l | #:G3 = 1 | #:G4 = T | #:G5 = | debugger invoked on a TYPE-ERROR in thread 2669: | The value :INVALID-OBJECT is not of type SB-KERNEL:LAYOUT. | You can type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL. | restarts (invokable by number or by possibly-abbreviated name): | 0: [ABORT ] Reduce debugger level (to debug level 1). | 1: Reduce debugger level (leaving debugger, returning to toplevel). | 2: [TOPLEVEL] Restart at toplevel READ/EVAL/PRINT loop. | (SB-PCL::CACHE-MISS-VALUES #<error printing object>) | 0[2] 1 | * (defun bar (x) (values x)) | BAR | * (bar) | debugger invoked on a SB-INT:SIMPLE-PROGRAM-ERROR in thread 2669: | invalid number of arguments: 0 | You can type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL. | restarts (invokable by number or by possibly-abbreviated name): | 0: [ABORT ] Reduce debugger level (leaving debugger, returning to toplevel). | 1: [TOPLEVEL] Restart at toplevel READ/EVAL/PRINT loop. | ("XEP for BAR" 0 269348568)[:EXTERNAL] | source: (SB-INT:NAMED-LAMBDA BAR (X) (BLOCK BAR (VALUES X))) | 0] l | #:G4 = 0 | #:G5 = 269348568 | 0] 1 Although I can print the locals for BAR, the value of #:G5 looks slightly suspicious, however, I'm not sure, since I'm not really up-to-speed with the debugger. I haven't checked to see if this fails without :SB-THREAD, which I can do if needed. -- lawrence mitchell <we...@gm...> |