mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 05:50:26 +02:00
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.
This commit is contained in:
parent
f63b2e4814
commit
08cf30f2a0
2 changed files with 7 additions and 3 deletions
|
@ -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 "~9@a~:[~*~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 " "))))
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue