From 4c2f88c73d7f7378c867fce0fe4537944b6eb2b2 Mon Sep 17 00:00:00 2001 From: Arthur Gleckler Date: Tue, 6 Aug 1991 22:15:35 +0000 Subject: [PATCH] Hardware traps now preserve the history when the trap is known to have occured in compiled code, since the history is perfectly well defined. --- v7/src/microcode/uxtrap.c | 14 +++++++++++--- v7/src/microcode/version.h | 4 ++-- v8/src/microcode/version.h | 4 ++-- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/v7/src/microcode/uxtrap.c b/v7/src/microcode/uxtrap.c index 0308fc7ca..e291118ba 100644 --- a/v7/src/microcode/uxtrap.c +++ b/v7/src/microcode/uxtrap.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/uxtrap.c,v 1.14 1991/07/24 19:48:24 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/uxtrap.c,v 1.15 1991/08/06 22:15:09 arthur Exp $ Copyright (c) 1990-91 Massachusetts Institute of Technology @@ -341,7 +341,6 @@ DEFUN (setup_trap_frame, (signo, info, scp, trinfo, new_stack_pointer), ? SHARP_F : (char_pointer_to_string (find_signal_name (signo)))); signal_code = (find_signal_code_name (signo, info, scp)); - History = (Make_Dummy_History ()); if (!stack_recovered_p) { Initialize_Stack (); @@ -353,7 +352,7 @@ DEFUN (setup_trap_frame, (signo, info, scp, trinfo, new_stack_pointer), } else Stack_Pointer = new_stack_pointer; - Will_Push ((6 + CONTINUATION_SIZE) + (STACK_ENV_EXTRA_SLOTS + 2)); + Will_Push (7 + CONTINUATION_SIZE); STACK_PUSH (trinfo -> extra_trap_info); STACK_PUSH (trinfo -> pc_info_2); STACK_PUSH (trinfo -> pc_info_1); @@ -364,6 +363,15 @@ DEFUN (setup_trap_frame, (signo, info, scp, trinfo, new_stack_pointer), Store_Return (RC_HARDWARE_TRAP); Store_Expression (long_to_integer (signo)); Save_Cont (); + Pushed (); + if (stack_recovered_p + /* This may want to do it in other cases, but this may be enough. */ + && (trinfo->state == STATE_COMPILED_CODE)) + { + Stop_History (); + } + History = (Make_Dummy_History ()); + Will_Push (STACK_ENV_EXTRA_SLOTS + 2); STACK_PUSH (signal_name); STACK_PUSH (handler); STACK_PUSH (STACK_FRAME_HEADER + 1); diff --git a/v7/src/microcode/version.h b/v7/src/microcode/version.h index 996219ffd..5ad04cf23 100644 --- a/v7/src/microcode/version.h +++ b/v7/src/microcode/version.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/version.h,v 11.92 1991/08/06 15:12:05 arthur Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/version.h,v 11.93 1991/08/06 22:15:35 arthur Exp $ Copyright (c) 1988-91 Massachusetts Institute of Technology @@ -46,5 +46,5 @@ MIT in each case. */ #define VERSION 11 #endif #ifndef SUBVERSION -#define SUBVERSION 92 +#define SUBVERSION 93 #endif diff --git a/v8/src/microcode/version.h b/v8/src/microcode/version.h index 62547bb7b..ff8595cf2 100644 --- a/v8/src/microcode/version.h +++ b/v8/src/microcode/version.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/version.h,v 11.92 1991/08/06 15:12:05 arthur Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/version.h,v 11.93 1991/08/06 22:15:35 arthur Exp $ Copyright (c) 1988-91 Massachusetts Institute of Technology @@ -46,5 +46,5 @@ MIT in each case. */ #define VERSION 11 #endif #ifndef SUBVERSION -#define SUBVERSION 92 +#define SUBVERSION 93 #endif -- 2.25.1