summaryrefslogtreecommitdiff
path: root/module/system/vm/frame.scm
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2015-07-20 16:24:49 +0200
committerAndy Wingo <wingo@pobox.com>2015-07-20 16:24:49 +0200
commit08cf30f2a0fc6c9e0851e229a11c09ab9aaacec0 (patch)
treeb18f5251998948e8645b793398c3b45358aeb61b /module/system/vm/frame.scm
parentf63b2e4814761f805d3e7897bc543ebd3543b008 (diff)
downloadguile-08cf30f2a0fc6c9e0851e229a11c09ab9aaacec0.tar.gz
Fix error printing some wrong-num-args backtraces
* module/system/repl/debug.scm (print-frame): Pass #:top-frame? #t for the top frame. * module/system/vm/frame.scm (available-bindings): Be permissive and allow #:top-frame? #f even when the IP is at the start of the function.
Diffstat (limited to 'module/system/vm/frame.scm')
-rw-r--r--module/system/vm/frame.scm5
1 files changed, 4 insertions, 1 deletions
diff --git a/module/system/vm/frame.scm b/module/system/vm/frame.scm
index ac5fbf6f5..b84f6683e 100644
--- a/module/system/vm/frame.scm
+++ b/module/system/vm/frame.scm
@@ -206,7 +206,10 @@
(when (< offset 0)
(error "ip did not correspond to an instruction boundary?"))
(if (zero? offset)
- (let ((live (if top-frame?
+ ;; It shouldn't be the case that both OFFSET and N are zero
+ ;; but TOP-FRAME? is false. Still, it could happen, as is
+ ;; currently the case in frame-arguments.
+ (let ((live (if (or top-frame? (zero? n))
(vector-ref inv n)
;; If we're not at a top frame, the IP points
;; to the continuation -- but we haven't