Skip to content
Snippets Groups Projects
Commit 25f4507f authored by ram's avatar ram
Browse files

In CODE-LOCATION-DEBUG-SOURCE, check for there being any source info so that we

never return NIL.  This was causing internal errors when printing the source
for functions whose file hadn't finished loading yet.
parent 8e9fea93
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;; ;;;
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/debug-int.lisp,v 1.60 1993/07/22 00:02:08 ram Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/debug-int.lisp,v 1.61 1993/07/24 01:45:08 ram Exp $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -2386,15 +2386,18 @@ ...@@ -2386,15 +2386,18 @@
(code-location-debug-function code-location))) (code-location-debug-function code-location)))
(sources (c::compiled-debug-info-source info)) (sources (c::compiled-debug-info-source info))
(len (length sources))) (len (length sources)))
(declare (list sources)) (declare (list sources))
(if (= len 1) (when (zerop len)
(car sources) (debug-signal 'no-debug-blocks :debug-function
(do ((prev sources src) (code-location-debug-function code-location)))
(src (cdr sources) (cdr src)) (if (= len 1)
(offset (code-location-top-level-form-offset code-location))) (car sources)
((null src) (car prev)) (do ((prev sources src)
(when (< offset (c::debug-source-source-root (car src))) (src (cdr sources) (cdr src))
(return (car prev))))))) (offset (code-location-top-level-form-offset code-location)))
((null src) (car prev))
(when (< offset (c::debug-source-source-root (car src)))
(return (car prev)))))))
(interpreted-code-location (interpreted-code-location
(first (first
(let ((c::*lexical-environment* (c::make-null-environment))) (let ((c::*lexical-environment* (c::make-null-environment)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment