From 5ca892f83e56c9db45c022308d9fa8bb9348c55e Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Thu, 13 Sep 1990 23:30:16 +0000 Subject: [PATCH] Add list depth and breadth limiting to the debugger. Export the debugger's control variables to the global environment. --- v7/src/runtime/debug.scm | 8 ++++++-- v7/src/runtime/runtime.pkg | 11 +++++++++-- v8/src/runtime/runtime.pkg | 11 +++++++++-- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/v7/src/runtime/debug.scm b/v7/src/runtime/debug.scm index 513c8bc61..42a0f054a 100644 --- a/v7/src/runtime/debug.scm +++ b/v7/src/runtime/debug.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/debug.scm,v 14.20 1990/09/12 02:47:02 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/debug.scm,v 14.21 1990/09/13 23:30:16 cph Exp $ Copyright (c) 1988, 1989, 1990 Massachusetts Institute of Technology @@ -42,6 +42,8 @@ MIT in each case. |# (define debugger:auto-toggle? true) (define debugger:count-subproblems-limit 50) (define debugger:use-history? false) +(define debugger:list-depth-limit 5) +(define debugger:list-breadth-limit 5) (define (debug #!optional object) (let ((dstate @@ -310,7 +312,9 @@ MIT in each case. |# (- (output-port/x-size (current-output-port)) 11)))))))))) (define (debugger-pp expression indentation) - (pretty-print expression (current-output-port) true indentation)) + (fluid-let ((*unparser-list-depth-limit* debugger:list-depth-limit) + (*unparser-list-breadth-limit* debugger:list-breadth-limit)) + (pretty-print expression (current-output-port) true indentation))) (define expression-indentation 4) diff --git a/v7/src/runtime/runtime.pkg b/v7/src/runtime/runtime.pkg index 99198f140..503016298 100644 --- a/v7/src/runtime/runtime.pkg +++ b/v7/src/runtime/runtime.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/runtime.pkg,v 14.77 1990/09/13 23:08:53 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/runtime.pkg,v 14.78 1990/09/13 23:30:01 cph Exp $ Copyright (c) 1988, 1989, 1990 Massachusetts Institute of Technology @@ -380,7 +380,14 @@ MIT in each case. |# (files "debug") (parent (runtime debugger-command-loop)) (export () - debug) + debug + debugger:auto-toggle? + debugger:count-subproblems-limit + debugger:list-breadth-limit + debugger:list-depth-limit + debugger:print-return-values? + debugger:student-walk? + debugger:use-history?) (initialization (initialize-package!))) (define-package (runtime debugger-command-loop) diff --git a/v8/src/runtime/runtime.pkg b/v8/src/runtime/runtime.pkg index 2e1345b49..525708a79 100644 --- a/v8/src/runtime/runtime.pkg +++ b/v8/src/runtime/runtime.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/runtime.pkg,v 14.77 1990/09/13 23:08:53 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/runtime.pkg,v 14.78 1990/09/13 23:30:01 cph Exp $ Copyright (c) 1988, 1989, 1990 Massachusetts Institute of Technology @@ -380,7 +380,14 @@ MIT in each case. |# (files "debug") (parent (runtime debugger-command-loop)) (export () - debug) + debug + debugger:auto-toggle? + debugger:count-subproblems-limit + debugger:list-breadth-limit + debugger:list-depth-limit + debugger:print-return-values? + debugger:student-walk? + debugger:use-history?) (initialization (initialize-package!))) (define-package (runtime debugger-command-loop) -- 2.25.1