Skip to content
Snippets Groups Projects
Commit df5b19cf authored by rtoy's avatar rtoy
Browse files

Fix handling of debug sources. When trying to read the source form

from the source file, the file is opened using the default external
format.  This is not right if the file was compiled using a different
external format, and we try to read it using the default format.

compiler/debug-dump.lisp:
o Set the INFO slot to the external format used to source files.

code/debug-info.lisp:
o Add comment that the INFO slot contains the external format for
  :FILES.  (It was previously unused.)

code/debug.lisp:
o Open the source file with the same format as used to compile the
  file.
parent b8b7b498
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
(ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/debug-info.lisp,v 1.28 2009/06/11 16:03:57 rtoy Rel $")
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/debug-info.lisp,v 1.29 2010/01/22 13:36:06 rtoy Exp $")
;;;
;;; **********************************************************************
;;;
......@@ -468,6 +468,8 @@ function (which would be useful info anyway).
;; If from :LISP, this is the function whose source is form 0.
;; If from :STREAM, this is whatever was the :SOURCE-INFO argument to
;; COMPILE-FROM-STREAM.
;; If from :FILE, this is the external format used to read from the
;; file while compiling
(info nil))
......
......@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
(ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/debug.lisp,v 1.67 2009/09/15 15:47:10 rtoy Rel $")
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/debug.lisp,v 1.68 2010/01/22 13:36:06 rtoy Exp $")
;;;
;;; **********************************************************************
;;;
......@@ -1479,7 +1479,9 @@ See the CMU Common Lisp User's Manual for more information.
(pathname name)))
(setq *cached-readtable* nil)
(when *cached-source-stream* (close *cached-source-stream*))
(setq *cached-source-stream* (open name :if-does-not-exist nil))
(setq *cached-source-stream*
(open name :if-does-not-exist nil
:external-format (or (c::debug-source-info d-source) :default)))
(unless *cached-source-stream*
(error "Source file no longer exists:~% ~A." (namestring name)))
(format t "~%; File: ~A~%" (namestring name)))
......
......@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
(ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/debug-dump.lisp,v 1.47 2004/04/06 20:44:01 rtoy Rel $")
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/debug-dump.lisp,v 1.48 2010/01/22 13:36:06 rtoy Exp $")
;;;
;;; **********************************************************************
;;;
......@@ -310,7 +310,8 @@ otherwise the truename."
:start-positions
(unless (eq *byte-compile* 't)
(coerce-to-smallest-eltype
(file-info-positions x)))))
(file-info-positions x)))
:info (source-info-external-format info)))
(name (file-info-name x)))
(etypecase name
((member :stream :lisp)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment