diff options
author | Andy Wingo <wingo@pobox.com> | 2010-10-01 18:15:23 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2010-10-01 18:15:23 +0200 |
commit | e867d563a56a86533f998441dc8c48dfef38d017 (patch) | |
tree | f20942408b8c8b647bae13d36996cb6a651ec145 /module/system/vm/coverage.scm | |
parent | c005daf9239b6c2b5574d88a0ee46195ac1cb1ec (diff) | |
download | guile-e867d563a56a86533f998441dc8c48dfef38d017.tar.gz |
add source:line-for-user, returning a 1-indexed line number
* module/system/vm/program.scm (source:line-for-user): New exported
procedure, returns a 1-indexed line, suitable for presentation to a
user.
(write-program): Use source:line-for-user when making fallback names.
* module/system/vm/coverage.scm (coverage-data->lcov):
* module/language/assembly/disassemble.scm (source->string):
* module/system/repl/debug.scm (print-frame): Use source:line-for-user.
Diffstat (limited to 'module/system/vm/coverage.scm')
-rw-r--r-- | module/system/vm/coverage.scm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/module/system/vm/coverage.scm b/module/system/vm/coverage.scm index 755463181..268d2112a 100644 --- a/module/system/vm/coverage.scm +++ b/module/system/vm/coverage.scm @@ -332,10 +332,10 @@ gathered, even if their code was not executed." (and (program? proc) (let ((sources (program-sources* data proc))) (and (pair? sources) - (let* ((line (source:line (car sources))) + (let* ((line (source:line-for-user (car sources))) (name (or (procedure-name proc) - (format #f "anonymous-l~a" (+ 1 line))))) - (format port "FN:~A,~A~%" (+ 1 line) name) + (format #f "anonymous-l~a" line)))) + (format port "FN:~A,~A~%" line name) (and=> (procedure-execution-count data proc) (lambda (count) (format port "FNDA:~A,~A~%" count name)))))))) |