From cf3c69ea3b765ca6b7b9b807220568eff20f8cb5 Mon Sep 17 00:00:00 2001 From: ws Date: Mon, 20 Dec 1993 17:16:42 +0000 Subject: [PATCH] Correct support for single stepping of syscalls and fpu emulation --- sys/arch/i386/i386/locore.s | 3 +++ sys/arch/i386/i386/trap.c | 10 +++------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/sys/arch/i386/i386/locore.s b/sys/arch/i386/i386/locore.s index 6791075cabdd..f88982a568dc 100644 --- a/sys/arch/i386/i386/locore.s +++ b/sys/arch/i386/i386/locore.s @@ -1867,6 +1867,9 @@ bpttraps: IDTVEC(syscall) pushl $0 # Room for tf_err pushfl # Room for tf_trapno + pushfl # turn off trace bit + andb $~(PSL_T>>8),1(%esp) + popfl INTRENTRY movl TF_TRAPNO(%esp),%eax # copy eflags from tf_trapno to fs_eflags movl %eax,TF_EFLAGS(%esp) diff --git a/sys/arch/i386/i386/trap.c b/sys/arch/i386/i386/trap.c index bf6bfea42aff..9e37ee87612f 100644 --- a/sys/arch/i386/i386/trap.c +++ b/sys/arch/i386/i386/trap.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 - * $Id: trap.c,v 1.20 1993/12/19 06:58:15 mycroft Exp $ + * $Id: trap.c,v 1.21 1993/12/20 17:16:47 ws Exp $ */ /* @@ -260,10 +260,8 @@ trap(frame) #ifdef MATH_EMULATE rv = math_emulate(&frame); if (rv == 0) { -#ifdef TRACE_EMU /* XXX is this necessary? */ if (frame.tf_eflags & PSL_T) goto trace; -#endif return; } #else @@ -378,10 +376,8 @@ trap(frame) #ifndef DDB /* XXX need to deal with this when DDB is present, too */ - case T_TRCTRAP: - /* kernel trace trap -- someone single stepping lcall's */ - frame.tf_eflags &= ~PSL_T; - /* restored later from lcall frame */ + case T_TRCTRAP: /* kernel trace trap -- someone single stepping lcall's */ + /* syscall has to turn off the trace bit itself */ return; #endif