[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 06/13: Fix error printing some wrong-num-args backtraces
From: |
Andy Wingo |
Subject: |
[Guile-commits] 06/13: Fix error printing some wrong-num-args backtraces |
Date: |
Wed, 22 Jul 2015 15:32:27 +0000 |
wingo pushed a commit to branch master
in repository guile.
commit 08cf30f2a0fc6c9e0851e229a11c09ab9aaacec0
Author: Andy Wingo <address@hidden>
Date: Mon Jul 20 16:24:49 2015 +0200
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.
---
module/system/repl/debug.scm | 5 +++--
module/system/vm/frame.scm | 5 ++++-
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/module/system/repl/debug.scm b/module/system/repl/debug.scm
index 300145d..6fff660 100644
--- a/module/system/repl/debug.scm
+++ b/module/system/repl/debug.scm
@@ -1,6 +1,6 @@
;;; Guile VM debugging facilities
-;;; Copyright (C) 2001, 2009, 2010, 2011, 2013, 2014 Free Software Foundation,
Inc.
+;;; Copyright (C) 2001, 2009, 2010, 2011, 2013, 2014, 2015 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
@@ -134,7 +134,8 @@
(format port "~&In ~a:~&" file))
(format port "address@hidden:[~*~3_~;~3d~] ~v:@y~%"
(if line (format #f "~a:~a" line col) "")
- index index width (frame-call-representation frame))
+ index index width
+ (frame-call-representation frame #:top-frame? (zero? index)))
(if full?
(print-locals frame #:width width
#:per-line-prefix " "))))
diff --git a/module/system/vm/frame.scm b/module/system/vm/frame.scm
index ac5fbf6..b84f668 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
- [Guile-commits] branch master updated (90aabcc -> aa7f0e2), Andy Wingo, 2015/07/22
- [Guile-commits] 04/13: CPS1 slot-allocation simplification, Andy Wingo, 2015/07/22
- [Guile-commits] 05/13: More slot-allocation simplification, Andy Wingo, 2015/07/22
- [Guile-commits] 03/13: Utils refactors, Andy Wingo, 2015/07/22
- [Guile-commits] 07/13: Fix bad return shuffles for multiply-used $kreceive conts, Andy Wingo, 2015/07/22
- [Guile-commits] 01/13: Reify primitives in CPS2, Andy Wingo, 2015/07/22
- [Guile-commits] 09/13: Fix CPS2 compute-successors, Andy Wingo, 2015/07/22
- [Guile-commits] 06/13: Fix error printing some wrong-num-args backtraces,
Andy Wingo <=
- [Guile-commits] 02/13: Add intset-prev and intset-fold-right, Andy Wingo, 2015/07/22
- [Guile-commits] 11/13: Compile CPS2 directly to bytecode, Andy Wingo, 2015/07/22
- [Guile-commits] 08/13: intset-intersect bugfix, Andy Wingo, 2015/07/22
- [Guile-commits] 10/13: Slot allocation and bytecode compilation from CPS2., Andy Wingo, 2015/07/22
- [Guile-commits] 12/13: Remove CPS1 language, Andy Wingo, 2015/07/22
- [Guile-commits] 13/13: Rename CPS2 to CPS, Andy Wingo, 2015/07/22