From 2dce53841ef99c4a54a0aed4fc7dfad67f082658 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Tue, 21 Nov 1989 00:00:31 +0000 Subject: [PATCH] If `fasload' fails to load debugging information for some reason, recover and pretend that the debugging info doesn't exist. --- v7/src/runtime/infutl.scm | 12 ++++++++---- v8/src/runtime/infutl.scm | 12 ++++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/v7/src/runtime/infutl.scm b/v7/src/runtime/infutl.scm index 387c76927..0ab0a2b49 100644 --- a/v7/src/runtime/infutl.scm +++ b/v7/src/runtime/infutl.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/infutl.scm,v 1.14 1989/10/26 06:46:23 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/infutl.scm,v 1.15 1989/11/21 00:00:31 cph Exp $ Copyright (c) 1988, 1989 Massachusetts Institute of Technology @@ -55,8 +55,7 @@ MIT in each case. |# (car old-info) (and demand-load? (let ((dbg-info (read-debugging-info old-info))) - (if dbg-info - (memoize-debugging-info! block dbg-info)) + (if dbg-info (memoize-debugging-info! block dbg-info)) dbg-info))))) (define (discard-debugging-info!) @@ -89,7 +88,12 @@ MIT in each case. |# (define (read-binf-file filename) (and (file-exists? filename) - (fasload filename true))) + (call-with-current-continuation + (lambda (k) + (bind-condition-handler (list error-type:fasload) + (lambda (condition) condition (k false)) + (lambda () (fasload filename true))))))) + (define (memoize-debugging-info! block dbg-info) (without-interrupts (lambda () diff --git a/v8/src/runtime/infutl.scm b/v8/src/runtime/infutl.scm index f743772f3..a98a5d1e7 100644 --- a/v8/src/runtime/infutl.scm +++ b/v8/src/runtime/infutl.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/infutl.scm,v 1.14 1989/10/26 06:46:23 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/infutl.scm,v 1.15 1989/11/21 00:00:31 cph Exp $ Copyright (c) 1988, 1989 Massachusetts Institute of Technology @@ -55,8 +55,7 @@ MIT in each case. |# (car old-info) (and demand-load? (let ((dbg-info (read-debugging-info old-info))) - (if dbg-info - (memoize-debugging-info! block dbg-info)) + (if dbg-info (memoize-debugging-info! block dbg-info)) dbg-info))))) (define (discard-debugging-info!) @@ -89,7 +88,12 @@ MIT in each case. |# (define (read-binf-file filename) (and (file-exists? filename) - (fasload filename true))) + (call-with-current-continuation + (lambda (k) + (bind-condition-handler (list error-type:fasload) + (lambda (condition) condition (k false)) + (lambda () (fasload filename true))))))) + (define (memoize-debugging-info! block dbg-info) (without-interrupts (lambda () -- 2.25.1