[slime-cvs] CVS slime
CVS User heller
heller at common-lisp.net
Tue Jan 5 09:00:31 UTC 2010
Update of /project/slime/cvsroot/slime
In directory cl-net:/tmp/cvs-serv31768
Modified Files:
ChangeLog swank-cmucl.lisp
Log Message:
Fix M-. bug related to CMUCL's multi-file compilation units.
* swank-cmucl.lisp (code-location-stream-position): Require the
"root-number" as argument and subtract it from the TLF number.
(location-in-file): Pass the root number along.
(code-location-string-offset): Use 0 as root number.
--- /project/slime/cvsroot/slime/ChangeLog 2010/01/05 09:00:22 1.1955
+++ /project/slime/cvsroot/slime/ChangeLog 2010/01/05 09:00:30 1.1956
@@ -1,5 +1,14 @@
2010-01-05 Helmut Eller <heller at common-lisp.net>
+ Fix M-. bug related to CMUCL's multi-file compilation units.
+
+ * swank-cmucl.lisp (code-location-stream-position): Require the
+ "root-number" as argument and subtract it from the TLF number.
+ (location-in-file): Pass the root number along.
+ (code-location-string-offset): Use 0 as root number.
+
+2010-01-05 Helmut Eller <heller at common-lisp.net>
+
Slightly better error message when CMUCL fails to find defstructs.
* swank-cmucl.lisp (struct-constructor, setf-definitions): Don't
--- /project/slime/cvsroot/slime/swank-cmucl.lisp 2010/01/05 09:00:22 1.217
+++ /project/slime/cvsroot/slime/swank-cmucl.lisp 2010/01/05 09:00:30 1.218
@@ -791,11 +791,12 @@
(defun location-in-file (filename code-location debug-source)
"Resolve the source location for CODE-LOCATION in FILENAME."
(let* ((code-date (di:debug-source-created debug-source))
+ (root-number (di:debug-source-root-number debug-source))
(source-code (get-source-code filename code-date)))
(with-input-from-string (s source-code)
(make-location (list :file (unix-truename filename))
(list :position (1+ (code-location-stream-position
- code-location s)))
+ code-location s root-number)))
`(:snippet ,(read-snippet s))))))
(defun location-in-stream (code-location debug-source)
@@ -848,14 +849,15 @@
;;;;; Groveling source-code for positions
-(defun code-location-stream-position (code-location stream)
+(defun code-location-stream-position (code-location stream root)
"Return the byte offset of CODE-LOCATION in STREAM. Extract the
toplevel-form-number and form-number from CODE-LOCATION and use that
to find the position of the corresponding form.
Finish with STREAM positioned at the start of the code location."
(let* ((location (debug::maybe-block-start-location code-location))
- (tlf-offset (di:code-location-top-level-form-offset location))
+ (tlf-offset (- (di:code-location-top-level-form-offset location)
+ root))
(form-number (di:code-location-form-number location)))
(let ((pos (form-number-stream-position tlf-offset form-number stream)))
(file-position stream pos)
@@ -877,7 +879,7 @@
"Return the byte offset of CODE-LOCATION in STRING.
See CODE-LOCATION-STREAM-POSITION."
(with-input-from-string (s string)
- (code-location-stream-position code-location s)))
+ (code-location-stream-position code-location s 0)))
;;;; Finding definitions
More information about the slime-cvs
mailing list