1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00

anonymous RTl functions print with source info

* module/system/vm/debug.scm (find-program-sources): If there is no
  source location before the low-pc of the procedure we're grovelling
  for, we were skipping the source loc info.  Fix that.

* module/system/vm/program.scm (write-program): Get source info for
  anonymous RTL functions.
  (program-sources, program-sources-pre-retire): Provide program
  counters relative to the beginning of the procedure.
This commit is contained in:
Andy Wingo 2013-10-03 22:48:17 +02:00
parent 7c54029740
commit b43e81dc60
2 changed files with 7 additions and 5 deletions

View file

@ -506,9 +506,11 @@ section of the ELF image. Returns an ELF symbol, or @code{#f}."
(line-prog (ctx-die (die-ctx die))))))))
(cond
((and low-pc high-pc prog)
(line-prog-scan-to-pc prog (1- low-pc))
(let lp ((sources '()))
(call-with-values (lambda () (line-prog-advance prog))
(call-with-values (lambda ()
(if (null? sources)
(line-prog-scan-to-pc prog low-pc)
(line-prog-advance prog)))
(lambda (pc file line col)
(if (and pc (< pc high-pc))
(lp (cons (make-source/dwarf (+ pc base) file line col)