print column numbers in backtraces
authorAndy Wingo <wingo@pobox.com>
Sat, 10 Jul 2010 10:32:24 +0000 (12:32 +0200)
committerAndy Wingo <wingo@pobox.com>
Sat, 10 Jul 2010 10:32:24 +0000 (12:32 +0200)
* module/system/repl/debug.scm (print-frame): Print column numbers too.

module/system/repl/debug.scm

index 361498a..1164c6b 100644 (file)
         "unknown file"))
   (let* ((source (frame-source frame))
          (file (source:pretty-file source))
-         (line (and=> source source:line)))
+         (line (and=> source source:line))
+         (col (and=> source source:column)))
     (if (and file (not (equal? file (source:pretty-file last-source))))
         (format port "~&In ~a:~&" file))
-    (format port "~:[~*~6_~;~5d:~]~:[~*~3_~;~3d~] ~v:@y~%"
-            line line index index width (frame-call-representation frame))
+    (format port "~9@a~:[~*~3_~;~3d~] ~v:@y~%"
+            (if line (format #f "~a:~a" line col) "")
+            index index width (frame-call-representation frame))
     (if full?
         (print-locals frame #:width width
                       #:per-line-prefix "     "))))