Re: Useless backtraces / functions called NIL
Juho Snellman <jsnell <at> iki.fi>
2007-03-05 13:59:09 GMT
Edi Weitz <edi <at> agharta.de> writes:
> I'm currently working on parts of a large project that I don't have
> complete control of. I don't even know all parts of it good enough
> yet. What I /do/ know, though, is that I sometimes (pretty often,
> actually) get completely useless backtraces where the "interesting"
> function calls are replaced with calls to functions named NIL.
SBCL almost always stores enough debug information to show at least
the name of the function, regardless of the compiler policy. The only
circumstance I know of where NIL shows up as the function name in a
backtrace is for anonymous functions compiled using (compile nil ...),
or some other construct that essentially boils down to that. For
example (eval '(foo)) -> (funcall (compile nil '(lambda () (foo)))).
But it shouldn't really be happening for named functions, or when
using file compilation.
> I suppose/hope it is not expected that I see these "NIL frames" and
> that I can make them go away somehow.
Hard to say without seeing an example. The attached patch fixes the
issue I described above, but might not help if it's something else.
RCS file: /cvsroot/sbcl/sbcl/src/compiler/main.lisp,v
retrieving revision 1.124
diff -u -r1.124 main.lisp
--- src/compiler/main.lisp 4 Mar 2007 23:47:58 -0000 1.124
+++ src/compiler/main.lisp 5 Mar 2007 13:53:12 -0000
<at> <at> -976,7 +976,8 <at> <at>
(let* ((locall-fun (let ((*allow-instrumenting* t))
- :source-name name)))
+ :source-name name
+ :debug-name definition)))
(debug-name (debug-name 'tl-xep name))
;; Convert the XEP using the policy of the real
;; function. Otherwise the wrong policy will be used for
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
Sbcl-help mailing list
Sbcl-help <at> lists.sourceforge.net