From 615eb45521a6810ca2bc89763d5b4892a88ae313 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Wed, 2 Jun 2010 22:56:10 +0200 Subject: [PATCH] brown-paper-bag commit * module/system/vm/debug.scm (frame->module): In which our author misunderstands git's index. --- module/system/vm/debug.scm | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/module/system/vm/debug.scm b/module/system/vm/debug.scm index f33045831..7bbb5c803 100644 --- a/module/system/vm/debug.scm +++ b/module/system/vm/debug.scm @@ -147,18 +147,19 @@ (define (frame->module frame) (let ((proc (frame-procedure frame))) (if (program? proc) - (let* ((mod (or (program-module proc) (current-module ))) + (let* ((mod (or (program-module proc) (current-module))) (mod* (make-module))) (module-use! mod* mod) (for-each (lambda (binding) - (module-add! - mod* - (binding:name binding) - (let ((x (frame-local-ref frame (binding:index binding)))) - (if (binding:boxed? binding) - x - (make-variable x))))) + (let* ((x (frame-local-ref frame (binding:index binding))) + (var (if (binding:boxed? binding) x (make-variable x)))) + (format (debug-output-port) + "~:[Read-only~;Mutable~] local variable ~a = ~70:@y\n" + (binding:boxed? binding) + (binding:name binding) + (if (variable-bound? var) (variable-ref var) var)) + (module-add! mod* (binding:name binding) var))) (frame-bindings frame)) mod*) (current-module))))