summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2010-01-09 20:40:36 +0100
committerAndy Wingo <wingo@pobox.com>2010-01-09 20:40:36 +0100
commit37e9bc8ae48ae2c014fd4f63fc37b18348d05513 (patch)
treedf656661af87bd75ebf807f575ab4d33bb2fe6ed
parent391d29029d69704bc6bd541d80209532e582c3c0 (diff)
downloadguile-37e9bc8ae48ae2c014fd4f63fc37b18348d05513.tar.gz
Narrow one more frame in debug.scm:debug-pre-unwind-handler
* module/system/vm/debug.scm (debug-pre-unwind-handler): Narrow two frames instead of stack-reffing past one. The second frame is necessary, now that make-stack itself is on the stack.
-rw-r--r--module/system/vm/debug.scm6
1 files changed, 3 insertions, 3 deletions
diff --git a/module/system/vm/debug.scm b/module/system/vm/debug.scm
index 938dca74e..935a938de 100644
--- a/module/system/vm/debug.scm
+++ b/module/system/vm/debug.scm
@@ -367,7 +367,7 @@ With an argument, select a frame by index, then show it."
;; (state associated with vm ?)
(define (debug-pre-unwind-handler key . args)
- (let ((stack (make-stack #t)))
+ (let ((stack (make-stack #t debug-pre-unwind-handler)))
(pmatch args
((,subr ,msg ,args . ,rest)
(format #t "Throw to key `~a':\n" key)
@@ -375,6 +375,6 @@ With an argument, select a frame by index, then show it."
(else
(format #t "Throw to key `~a' with args `~s'." key args)))
(format #t "Entering the debugger. Type `bt' for a backtrace or `c' to continue.\n")
- (run-debugger (stack-ref stack 1)))
- (save-stack 1)
+ (run-debugger (stack-ref stack 0)))
+ (save-stack debug-pre-unwind-handler)
(apply throw key args))