summaryrefslogtreecommitdiff
path: root/module/system/vm/traps.scm
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2014-01-28 21:31:17 +0100
committerAndy Wingo <wingo@pobox.com>2014-01-28 21:31:17 +0100
commitae4d761f7ab0c02081a4edfb70b4199bfa077025 (patch)
treea9e5849d1504b92bbb81ef85e870f6e6a0d99323 /module/system/vm/traps.scm
parent02c624fc09079491660317977a5f202ecc2b1fc8 (diff)
downloadguile-ae4d761f7ab0c02081a4edfb70b4199bfa077025.tar.gz
Fix tracing
* module/system/vm/trace.scm (print-return): Remove frame argument. (trace-calls-to-procedure, trace-calls-in-procedure): Adapt callers. * module/system/vm/traps.scm (trap-in-procedure, trap-frame-finish): (trap-calls-to-procedure): Since the pop continuation hook is now called after the continuation is popped, we need to check the right frame. Fixes tail-calls in the trace root, and probably other things.
Diffstat (limited to 'module/system/vm/traps.scm')
-rw-r--r--module/system/vm/traps.scm10
1 files changed, 5 insertions, 5 deletions
diff --git a/module/system/vm/traps.scm b/module/system/vm/traps.scm
index 114647e9e..77823e1aa 100644
--- a/module/system/vm/traps.scm
+++ b/module/system/vm/traps.scm
@@ -1,6 +1,6 @@
;;; Traps: stepping, breakpoints, and such.
-;; Copyright (C) 2010, 2012, 2013 Free Software Foundation, Inc.
+;; Copyright (C) 2010, 2012, 2013, 2014 Free Software Foundation, Inc.
;;; This library is free software; you can redistribute it and/or
;;; modify it under the terms of the GNU Lesser General Public
@@ -193,8 +193,8 @@
(define (pop-cont-hook frame . values)
(if in-proc?
(exit-proc frame))
- (if (our-frame? (frame-previous frame))
- (enter-proc (frame-previous frame))))
+ (if (our-frame? frame)
+ (enter-proc frame)))
(define (abort-hook frame . values)
(if in-proc?
@@ -403,7 +403,7 @@
(arg-check abort-handler procedure?)
(let ((fp (frame-address frame)))
(define (pop-cont-hook frame . values)
- (if (and fp (eq? (frame-address frame) fp))
+ (if (and fp (< (frame-address frame) fp))
(begin
(set! fp #f)
(apply return-handler frame values))))
@@ -548,7 +548,7 @@
(apply-handler frame depth)
- (if (not (eq? (frame-address frame) last-fp))
+ (if (not (eqv? (frame-address frame) last-fp))
(let ((finish-trap #f))
(define (frame-finished frame)
(finish-trap frame) ;; disables the trap.