From: Taylor R. Campbell Date: Thu, 20 Jul 2006 17:09:44 +0000 (+0000) Subject: Move STACK-TRACE from mod_lisp server to the run-time system. X-Git-Tag: 20090517-FFI~982 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=768494dc5fd2ebdab42049eaf51b0f452e28f9fc;p=mit-scheme.git Move STACK-TRACE from mod_lisp server to the run-time system. --- diff --git a/v7/src/runtime/debug.scm b/v7/src/runtime/debug.scm index 188083bec..56b06bfd4 100644 --- a/v7/src/runtime/debug.scm +++ b/v7/src/runtime/debug.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: debug.scm,v 14.46 2005/04/01 04:46:36 cph Exp $ +$Id: debug.scm,v 14.47 2006/07/20 17:09:44 riastradh Exp $ Copyright 1986,1987,1988,1989,1990,1991 Massachusetts Institute of Technology Copyright 1992,1993,1999,2001,2002,2005 Massachusetts Institute of Technology @@ -84,6 +84,20 @@ USA. "You are now in the debugger. Type q to quit, ? for commands."))) "debug>" dstate))))) + +(define (stack-trace condition port) + (let ((dstate (make-initial-dstate condition))) + (command/print-subproblem dstate port) + (let loop () + (if (let ((next + (stack-frame/next-subproblem + (dstate/subproblem dstate)))) + (and next (not (stack-frame/repl-eval-boundary? next)))) + (begin + (newline port) + (newline port) + (command/earlier-subproblem dstate port) + (loop)))))) (define (make-initial-dstate object) (let ((make-dstate diff --git a/v7/src/runtime/runtime.pkg b/v7/src/runtime/runtime.pkg index 298bc138e..80e0e06fc 100644 --- a/v7/src/runtime/runtime.pkg +++ b/v7/src/runtime/runtime.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: runtime.pkg,v 14.586 2006/06/21 03:00:05 cph Exp $ +$Id: runtime.pkg,v 14.587 2006/07/20 17:09:44 riastradh Exp $ Copyright 1988,1989,1990,1991,1992,1993 Massachusetts Institute of Technology Copyright 1994,1995,1996,1997,1998,1999 Massachusetts Institute of Technology @@ -1285,7 +1285,8 @@ USA. debugger:print-return-values? debugger:string-length-limit debugger:student-walk? - debugger:use-history?) + debugger:use-history? + stack-trace) (initialization (initialize-package!))) (define-package (runtime debugger-command-loop) diff --git a/v7/src/ssp/mod-lisp.scm b/v7/src/ssp/mod-lisp.scm index 947d5a32c..13a81a3ec 100644 --- a/v7/src/ssp/mod-lisp.scm +++ b/v7/src/ssp/mod-lisp.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: mod-lisp.scm,v 1.30 2005/09/20 19:23:15 cph Exp $ +$Id: mod-lisp.scm,v 1.31 2006/07/20 17:09:44 riastradh Exp $ Copyright 2003,2004,2005 Massachusetts Institute of Technology @@ -803,20 +803,6 @@ USA. (procedure line) (loop)))))) -(define (stack-trace condition port) - (let ((dstate (make-initial-dstate condition))) - (command/print-subproblem dstate port) - (let loop () - (if (let ((next - (stack-frame/next-subproblem - (dstate/subproblem dstate)))) - (and next (not (stack-frame/repl-eval-boundary? next)))) - (begin - (newline port) - (newline port) - (command/earlier-subproblem dstate port) - (loop)))))) - ;;;; Logging (define (start-logging-requests pathname) diff --git a/v7/src/ssp/ssp.pkg b/v7/src/ssp/ssp.pkg index ecd29f7ba..b3c3342bf 100644 --- a/v7/src/ssp/ssp.pkg +++ b/v7/src/ssp/ssp.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: ssp.pkg,v 1.20 2005/02/19 04:35:39 cph Exp $ +$Id: ssp.pkg,v 1.21 2006/07/20 17:09:44 riastradh Exp $ Copyright 2003,2004,2005 Massachusetts Institute of Technology @@ -40,11 +40,6 @@ USA. (define-package (runtime ssp mod-lisp) (files "mod-lisp") (parent (runtime ssp)) - (import (runtime debugger) - command/earlier-subproblem - command/print-subproblem - dstate/subproblem - make-initial-dstate) (export () start-mod-lisp-server) (export (runtime ssp)