From 374b88580c388af1e96ff82cedd2b6f9a708580b Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Wed, 1 Mar 2017 16:06:53 +0100 Subject: [PATCH] Fix trap frame matching * module/system/vm/traps.scm (program-last-ip): Actually return an absolute IP. Fixes traps! --- module/system/vm/traps.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/module/system/vm/traps.scm b/module/system/vm/traps.scm index db82a0ab9..c4861c925 100644 --- a/module/system/vm/traps.scm +++ b/module/system/vm/traps.scm @@ -110,7 +110,9 @@ ;; Returns an absolute IP. (define (program-last-ip prog) (let ((pdi (find-program-debug-info (program-code prog)))) - (and pdi (program-debug-info-size pdi)))) + (and pdi + (+ (program-debug-info-addr pdi) + (program-debug-info-size pdi))))) (define (frame-matcher proc) (let ((proc (if (struct? proc)