Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Add an e_trapsignal member to struct emul, so that emula...
details: https://anonhg.NetBSD.org/src/rev/8c17a0f08450
branches: trunk
changeset: 511327:8c17a0f08450
user: christos <christos%NetBSD.org@localhost>
date: Mon Jun 18 02:00:48 2001 +0000
description:
Add an e_trapsignal member to struct emul, so that emulated processes can
send the appropriate signal depending on the trap type.
diffstat:
sys/arch/alpha/conf/files.alpha | 3 ++-
sys/arch/amiga/conf/files.amiga | 3 ++-
sys/arch/amigappc/conf/files.amigappc | 3 ++-
sys/arch/atari/conf/files.atari | 3 ++-
sys/arch/bebox/conf/files.bebox | 5 +++--
sys/arch/hp300/conf/files.hp300 | 3 ++-
sys/arch/i386/conf/files.i386 | 3 ++-
sys/arch/i386/i386/trap.c | 20 ++++++++++----------
sys/arch/mac68k/conf/files.mac68k | 3 ++-
sys/arch/mvme68k/conf/files.mvme68k | 3 ++-
sys/arch/news68k/conf/files.news68k | 3 ++-
sys/arch/next68k/conf/files.next68k | 3 ++-
sys/arch/ofppc/conf/files.ofppc | 5 +++--
sys/arch/prep/conf/files.prep | 5 +++--
sys/arch/sandpoint/conf/files.sandpoint | 5 +++--
sys/arch/sun2/conf/files.sun2 | 3 ++-
sys/arch/sun3/conf/files.sun3 | 3 ++-
sys/arch/x68k/conf/files.x68k | 3 ++-
sys/compat/aout/aout_exec.c | 3 ++-
sys/compat/aoutm68k/aoutm68k_exec.c | 3 ++-
sys/compat/freebsd/freebsd_exec.c | 3 ++-
sys/compat/hpux/hpux_exec.c | 3 ++-
sys/compat/ibcs2/ibcs2_exec.c | 3 ++-
sys/compat/linux/common/linux_exec.c | 3 ++-
sys/compat/linux/common/linux_exec.h | 3 ++-
sys/compat/netbsd32/netbsd32_netbsd.c | 3 ++-
sys/compat/osf1/osf1_exec.c | 3 ++-
sys/compat/pecoff/pecoff_exec.c | 3 ++-
sys/compat/sunos/sunos_exec.c | 3 ++-
sys/compat/sunos32/sunos32_exec.c | 3 ++-
sys/compat/svr4/svr4_exec.c | 3 ++-
sys/compat/svr4_32/svr4_32_exec.c | 3 ++-
sys/compat/ultrix/ultrix_misc.c | 3 ++-
sys/kern/kern_exec.c | 3 ++-
sys/sys/proc.h | 3 ++-
35 files changed, 82 insertions(+), 48 deletions(-)
diffs (truncated from 661 to 300 lines):
diff -r fa4f0fe4c542 -r 8c17a0f08450 sys/arch/alpha/conf/files.alpha
--- a/sys/arch/alpha/conf/files.alpha Mon Jun 18 01:58:08 2001 +0000
+++ b/sys/arch/alpha/conf/files.alpha Mon Jun 18 02:00:48 2001 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.alpha,v 1.139 2001/04/29 05:54:29 thorpej Exp $
+# $NetBSD: files.alpha,v 1.140 2001/06/18 02:00:48 christos Exp $
#
# alpha-specific configuration info
@@ -551,6 +551,7 @@
include "compat/linux/arch/alpha/files.linux_alpha"
file arch/alpha/alpha/linux_sigcode.s compat_linux
file arch/alpha/alpha/linux_syscall.c compat_linux
+file arch/alpha/alpha/linux_trap.c compat_linux
# OSS audio driver compatibility
include "compat/ossaudio/files.ossaudio"
diff -r fa4f0fe4c542 -r 8c17a0f08450 sys/arch/amiga/conf/files.amiga
--- a/sys/arch/amiga/conf/files.amiga Mon Jun 18 01:58:08 2001 +0000
+++ b/sys/arch/amiga/conf/files.amiga Mon Jun 18 02:00:48 2001 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.amiga,v 1.107 2001/05/08 06:09:30 is Exp $
+# $NetBSD: files.amiga,v 1.108 2001/06/18 02:00:48 christos Exp $
# maxpartitions must be first item in files.${ARCH}.newconf
maxpartitions 16 # NOTE THAT AMIGA IS SPECIAL!
@@ -468,6 +468,7 @@
# Linux binary compatibility (COMPAT_LINUX)
include "compat/linux/files.linux"
include "compat/linux/arch/m68k/files.linux_m68k"
+file arch/m68k/m68k/linux_trap.c compat_linux
# OSS audio driver compatibility
include "compat/ossaudio/files.ossaudio"
diff -r fa4f0fe4c542 -r 8c17a0f08450 sys/arch/amigappc/conf/files.amigappc
--- a/sys/arch/amigappc/conf/files.amigappc Mon Jun 18 01:58:08 2001 +0000
+++ b/sys/arch/amigappc/conf/files.amigappc Mon Jun 18 02:00:48 2001 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.amigappc,v 1.2 2000/07/04 14:18:07 is Exp $
+# $NetBSD: files.amigappc,v 1.3 2001/06/18 02:00:48 christos Exp $
# maxpartitions must be first item in files.${ARCH}.newconf
maxpartitions 16 # NOTE THAT AMIGA IS SPECIAL!
@@ -411,6 +411,7 @@
# Linux binary compatibility (COMPAT_LINUX)
#include "compat/linux/files.linux"
#include "compat/linux/arch/m68k/files.linux_m68k"
+#file arch/m68k/m68k/linux_trap.c compat_linux
# OSS audio driver compatibility
include "compat/ossaudio/files.ossaudio"
diff -r fa4f0fe4c542 -r 8c17a0f08450 sys/arch/atari/conf/files.atari
--- a/sys/arch/atari/conf/files.atari Mon Jun 18 01:58:08 2001 +0000
+++ b/sys/arch/atari/conf/files.atari Mon Jun 18 02:00:48 2001 +0000
@@ -1,5 +1,5 @@
#
-# $NetBSD: files.atari,v 1.86 2001/06/07 07:23:02 leo Exp $
+# $NetBSD: files.atari,v 1.87 2001/06/18 02:00:48 christos Exp $
maxpartitions 16
@@ -237,6 +237,7 @@
# Linux binary compatibility (COMPAT_LINUX)
include "compat/linux/files.linux"
include "compat/linux/arch/m68k/files.linux_m68k"
+file arch/m68k/m68k/linux_trap.c compat_linux
# OSS audio driver compatibility
include "compat/ossaudio/files.ossaudio"
diff -r fa4f0fe4c542 -r 8c17a0f08450 sys/arch/bebox/conf/files.bebox
--- a/sys/arch/bebox/conf/files.bebox Mon Jun 18 01:58:08 2001 +0000
+++ b/sys/arch/bebox/conf/files.bebox Mon Jun 18 02:00:48 2001 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.bebox,v 1.26 2001/06/12 17:13:34 tsubai Exp $
+# $NetBSD: files.bebox,v 1.27 2001/06/18 02:00:49 christos Exp $
#
# First try for bebox specific configuration info
#
@@ -29,7 +29,8 @@
# Linux binary compatibility (COMPAT_LINUX)
include "compat/linux/files.linux"
include "compat/linux/arch/powerpc/files.linux_powerpc"
-file arch/powerpc/powerpc/linux_sigcode.S compat_linux
+file arch/powerpc/powerpc/linux_sigcode.S compat_linux
+file arch/powerpc/powerpc/linux_trap.c compat_linux
#
# Machine-independent SCSI drivers
diff -r fa4f0fe4c542 -r 8c17a0f08450 sys/arch/hp300/conf/files.hp300
--- a/sys/arch/hp300/conf/files.hp300 Mon Jun 18 01:58:08 2001 +0000
+++ b/sys/arch/hp300/conf/files.hp300 Mon Jun 18 02:00:48 2001 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.hp300,v 1.44 2001/01/17 00:07:24 fvdl Exp $
+# $NetBSD: files.hp300,v 1.45 2001/06/18 02:00:49 christos Exp $
#
# hp300-specific configuration info
@@ -226,6 +226,7 @@
# Linux binary compatibility (COMPAT_LINUX)
include "compat/linux/files.linux"
include "compat/linux/arch/m68k/files.linux_m68k"
+file arch/m68k/m68k/linux_trap.c compat_linux
# a.out binary compatibility (COMPAT_AOUT)
include "compat/aout/files.aout"
diff -r fa4f0fe4c542 -r 8c17a0f08450 sys/arch/i386/conf/files.i386
--- a/sys/arch/i386/conf/files.i386 Mon Jun 18 01:58:08 2001 +0000
+++ b/sys/arch/i386/conf/files.i386 Mon Jun 18 02:00:48 2001 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.i386,v 1.187 2001/04/22 18:39:49 jdolecek Exp $
+# $NetBSD: files.i386,v 1.188 2001/06/18 02:00:49 christos Exp $
#
# new style config file for i386 architecture
#
@@ -334,6 +334,7 @@
include "compat/linux/arch/i386/files.linux_i386"
file arch/i386/i386/linux_sigcode.s compat_linux
file arch/i386/i386/linux_syscall.c compat_linux
+file arch/i386/i386/linux_trap.c compat_linux
# FreeBSD binary compatibility (COMPAT_FREEBSD)
include "compat/freebsd/files.freebsd"
diff -r fa4f0fe4c542 -r 8c17a0f08450 sys/arch/i386/i386/trap.c
--- a/sys/arch/i386/i386/trap.c Mon Jun 18 01:58:08 2001 +0000
+++ b/sys/arch/i386/i386/trap.c Mon Jun 18 02:00:48 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.160 2001/06/17 21:01:36 sommerfeld Exp $ */
+/* $NetBSD: trap.c,v 1.161 2001/06/18 02:00:49 christos Exp $ */
/*-
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -322,12 +322,12 @@
case T_STKFLT|T_USER:
case T_ALIGNFLT|T_USER:
case T_NMI|T_USER:
- trapsignal(p, SIGBUS, type &~ T_USER);
+ (*p->p_emul->e_trapsignal)(p, SIGBUS, type & ~T_USER);
goto out;
case T_PRIVINFLT|T_USER: /* privileged instruction fault */
case T_FPOPFLT|T_USER: /* coprocessor operand fault */
- trapsignal(p, SIGILL, type &~ T_USER);
+ (*p->p_emul->e_trapsignal)(p, SIGILL, type & ~T_USER);
goto out;
case T_ASTFLT|T_USER: /* Allow process switch */
@@ -349,12 +349,12 @@
goto trace;
return;
}
- trapsignal(p, rv, type &~ T_USER);
+ (*p->p_emul->e_trapsignal)(p, rv, type & ~T_USER);
goto out;
#else
printf("pid %d killed due to lack of floating point\n",
p->p_pid);
- trapsignal(p, SIGKILL, type &~ T_USER);
+ (*p->p_emul->e_trapsignal)(p, SIGKILL, type & ~T_USER);
goto out;
#endif
}
@@ -362,11 +362,11 @@
case T_BOUND|T_USER:
case T_OFLOW|T_USER:
case T_DIVIDE|T_USER:
- trapsignal(p, SIGFPE, type &~ T_USER);
+ (*p->p_emul->e_trapsignal)(p, SIGFPE, type & ~T_USER);
goto out;
case T_ARITHTRAP|T_USER:
- trapsignal(p, SIGFPE, frame.tf_err);
+ (*p->p_emul->e_trapsignal)(p, SIGFPE, frame.tf_err);
goto out;
case T_PAGEFLT: /* allow page faults in kernel mode */
@@ -469,9 +469,9 @@
p->p_pid, p->p_comm,
p->p_cred && p->p_ucred ?
p->p_ucred->cr_uid : -1);
- trapsignal(p, SIGKILL, T_PAGEFLT);
+ (*p->p_emul->e_trapsignal)(p, SIGKILL, T_PAGEFLT);
} else {
- trapsignal(p, SIGSEGV, T_PAGEFLT);
+ (*p->p_emul->e_trapsignal)(p, SIGSEGV, T_PAGEFLT);
}
break;
}
@@ -491,7 +491,7 @@
#ifdef MATH_EMULATE
trace:
#endif
- trapsignal(p, SIGTRAP, type &~ T_USER);
+ (*p->p_emul->e_trapsignal)(p, SIGTRAP, type & ~T_USER);
break;
#if NISA > 0 || NMCA > 0
diff -r fa4f0fe4c542 -r 8c17a0f08450 sys/arch/mac68k/conf/files.mac68k
--- a/sys/arch/mac68k/conf/files.mac68k Mon Jun 18 01:58:08 2001 +0000
+++ b/sys/arch/mac68k/conf/files.mac68k Mon Jun 18 02:00:48 2001 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.mac68k,v 1.97 2001/01/17 00:07:27 fvdl Exp $
+# $NetBSD: files.mac68k,v 1.98 2001/06/18 02:00:50 christos Exp $
# mac68k-specific configuration info
@@ -199,6 +199,7 @@
# Linux binary compatibility (COMPAT_LINUX)
include "compat/linux/files.linux"
include "compat/linux/arch/m68k/files.linux_m68k"
+file arch/m68k/m68k/linux_trap.c compat_linux
# OSS audio driver compatibility
include "compat/ossaudio/files.ossaudio"
diff -r fa4f0fe4c542 -r 8c17a0f08450 sys/arch/mvme68k/conf/files.mvme68k
--- a/sys/arch/mvme68k/conf/files.mvme68k Mon Jun 18 01:58:08 2001 +0000
+++ b/sys/arch/mvme68k/conf/files.mvme68k Mon Jun 18 02:00:48 2001 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.mvme68k,v 1.43 2001/04/30 09:05:59 scw Exp $
+# $NetBSD: files.mvme68k,v 1.44 2001/06/18 02:00:50 christos Exp $
# config file for mvme68k
@@ -145,6 +145,7 @@
# Linux binary compatibility (COMPAT_LINUX)
include "compat/linux/files.linux"
include "compat/linux/arch/m68k/files.linux_m68k"
+file arch/m68k/m68k/linux_trap.c compat_linux
# OSS audio driver compatibility
include "compat/ossaudio/files.ossaudio"
diff -r fa4f0fe4c542 -r 8c17a0f08450 sys/arch/news68k/conf/files.news68k
--- a/sys/arch/news68k/conf/files.news68k Mon Jun 18 01:58:08 2001 +0000
+++ b/sys/arch/news68k/conf/files.news68k Mon Jun 18 02:00:48 2001 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.news68k,v 1.12 2001/03/04 16:14:21 tsutsui Exp $
+# $NetBSD: files.news68k,v 1.13 2001/06/18 02:00:50 christos Exp $
# NEWS68K-specific configuration info
@@ -142,6 +142,7 @@
# Linux binary compatibility (COMPAT_LINUX)
include "compat/linux/files.linux"
include "compat/linux/arch/m68k/files.linux_m68k"
+file arch/m68k/m68k/linux_trap.c compat_linux
# a.out binary compatibility (COMPAT_AOUT)
include "compat/aout/files.aout"
diff -r fa4f0fe4c542 -r 8c17a0f08450 sys/arch/next68k/conf/files.next68k
--- a/sys/arch/next68k/conf/files.next68k Mon Jun 18 01:58:08 2001 +0000
+++ b/sys/arch/next68k/conf/files.next68k Mon Jun 18 02:00:48 2001 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.next68k,v 1.19 2001/05/12 22:35:29 chs Exp $
+# $NetBSD: files.next68k,v 1.20 2001/06/18 02:00:50 christos Exp $
# next68k-specific configuration info
@@ -108,6 +108,7 @@
# Linux binary compatibility (COMPAT_LINUX)
include "compat/linux/files.linux"
include "compat/linux/arch/m68k/files.linux_m68k"
+file arch/m68k/m68k/linux_trap.c compat_linux
# OSS audio driver compatibility
include "compat/ossaudio/files.ossaudio"
diff -r fa4f0fe4c542 -r 8c17a0f08450 sys/arch/ofppc/conf/files.ofppc
--- a/sys/arch/ofppc/conf/files.ofppc Mon Jun 18 01:58:08 2001 +0000
+++ b/sys/arch/ofppc/conf/files.ofppc Mon Jun 18 02:00:48 2001 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.ofppc,v 1.12 2001/01/19 01:51:17 manu Exp $
+# $NetBSD: files.ofppc,v 1.13 2001/06/18 02:00:50 christos Exp $
#
# First try for ofppc-specific configuration info
#
@@ -30,7 +30,8 @@
# Linux binary compatibility (COMPAT_LINUX)
include "compat/linux/files.linux"
include "compat/linux/arch/powerpc/files.linux_powerpc"
-file arch/powerpc/powerpc/linux_sigcode.S compat_linux
+file arch/powerpc/powerpc/linux_sigcode.S compat_linux
+file arch/powerpc/powerpc/linux_trap.c compat_linux
#
# Generic OpenFirmware device support
diff -r fa4f0fe4c542 -r 8c17a0f08450 sys/arch/prep/conf/files.prep
--- a/sys/arch/prep/conf/files.prep Mon Jun 18 01:58:08 2001 +0000
+++ b/sys/arch/prep/conf/files.prep Mon Jun 18 02:00:48 2001 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.prep,v 1.17 2001/06/15 15:50:04 nonaka Exp $
+# $NetBSD: files.prep,v 1.18 2001/06/18 02:00:51 christos Exp $
#
# prep-specific configuration info
#
@@ -27,7 +27,8 @@
# Linux binary compatibility (COMPAT_LINUX)
include "compat/linux/files.linux"
include "compat/linux/arch/powerpc/files.linux_powerpc"
-file arch/powerpc/powerpc/linux_sigcode.S compat_linux
+file arch/powerpc/powerpc/linux_sigcode.S compat_linux
+file arch/powerpc/powerpc/linux_trap.c compat_linux
Home |
Main Index |
Thread Index |
Old Index