(setf (debug-source-from res) name
(debug-source-name res) (file-info-forms file-info)))
(pathname
- (let* ((untruename (file-info-untruename file-info))
- (dir (pathname-directory untruename)))
- (setf (debug-source-name res)
- #+sb-xc-host
- (let ((src (position "src" dir :test #'string= :from-end t)))
- (if src
- (format nil "SYS:~{~:@(~A~);~}~:@(~A~).LISP"
- (subseq dir src) (pathname-name untruename))
- ;; FIXME: just output/stuff-groveled-from-headers.lisp
- (namestring untruename)))
- #-sb-xc-host
- (namestring
- (if (and dir (eq (first dir) :absolute))
- untruename
- name))))))
+ (setf (debug-source-name res)
+ (make-file-info-namestring name file-info))))
res))
;;; Given an arbitrary sequence, coerce it to an unsigned vector if
(declare (type index flags))
(when minimal
(setq flags (logior flags compiled-debug-var-minimal-p))
- (unless tn
+ (unless (and tn (tn-offset tn))
(setq flags (logior flags compiled-debug-var-deleted-p))))
(when (and (or (eq kind :environment)
(and (eq kind :debug-environment)
(vector-push-extend name buffer)
(unless (zerop id)
(vector-push-extend id buffer)))
- (if tn
+ (if (and tn (tn-offset tn))
(vector-push-extend (tn-sc-offset tn) buffer)
(aver minimal))
(when save-tn
(defun compute-1-debug-fun (fun var-locs)
(declare (type clambda fun) (type hash-table var-locs))
(let* ((dfun (dfun-from-fun fun))
- (actual-level (policy (lambda-bind fun) debug))
+ (actual-level (policy (lambda-bind fun) compute-debug-fun))
(level (if #!+sb-dyncount *collect-dynamic-statistics*
#!-sb-dyncount nil
(max actual-level 2)