mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 05:50:26 +02:00
A couple of fixes when no source info is available
* module/system/vm/assembler.scm (link-debug): If there was no debugging info, reset the file register to 0 from its default value of 1 before adding the final row. * module/system/vm/dwarf.scm (line-prog-scan-to-pc): If we rescanned from the beginning and still found no source info for this pc, return #f instead of the default value of the file register (1).
This commit is contained in:
parent
4a6d351979
commit
6b71a76713
2 changed files with 11 additions and 3 deletions
|
@ -1718,7 +1718,12 @@ it will be added to the GC roots at runtime."
|
||||||
|
|
||||||
(let lp ((in out) (pc 0) (file 1) (line 1) (col 0))
|
(let lp ((in out) (pc 0) (file 1) (line 1) (col 0))
|
||||||
(match in
|
(match in
|
||||||
(() (end-sequence pc))
|
(()
|
||||||
|
(when (null? out)
|
||||||
|
;; There was no source info in the first place. Set
|
||||||
|
;; file register to 0 before adding final row.
|
||||||
|
(set-file 0))
|
||||||
|
(end-sequence pc))
|
||||||
(((pc* file* line* col*) . in*)
|
(((pc* file* line* col*) . in*)
|
||||||
(cond
|
(cond
|
||||||
((and (eqv? file file*) (eqv? line line*) (eqv? col col*))
|
((and (eqv? file file*) (eqv? line line*) (eqv? col col*))
|
||||||
|
|
|
@ -1397,6 +1397,9 @@
|
||||||
(scan pos* pc* file* line* col*))
|
(scan pos* pc* file* line* col*))
|
||||||
((= pc* target-pc)
|
((= pc* target-pc)
|
||||||
(finish pos* pc* file* line* col*))
|
(finish pos* pc* file* line* col*))
|
||||||
|
((zero? pc)
|
||||||
|
;; We scanned from the beginning didn't find any info.
|
||||||
|
(values #f #f #f #f))
|
||||||
(else
|
(else
|
||||||
(finish pos pc file line col))))))
|
(finish pos pc file line col))))))
|
||||||
(let ((pos (lregs-pos regs))
|
(let ((pos (lregs-pos regs))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue