summaryrefslogtreecommitdiff
path: root/sys/arch/alpha
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1997-02-03 13:09:17 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1997-02-03 13:09:17 +0000
commit43c4f19381db7d00fe209c9b2a6a48e55c2623f3 (patch)
tree58b94b6b18d0537be44b904f8b7e7b7d06a93343 /sys/arch/alpha
parentcb5d8c0fa1e3cf6632dc06ee22fc94b847de1866 (diff)
initial cut at siginfo
Diffstat (limited to 'sys/arch/alpha')
-rw-r--r--sys/arch/alpha/alpha/machdep.c6
-rw-r--r--sys/arch/alpha/alpha/trap.c15
2 files changed, 16 insertions, 5 deletions
diff --git a/sys/arch/alpha/alpha/machdep.c b/sys/arch/alpha/alpha/machdep.c
index 92c2efb6955..87cb15c33af 100644
--- a/sys/arch/alpha/alpha/machdep.c
+++ b/sys/arch/alpha/alpha/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.15 1997/01/24 19:56:37 niklas Exp $ */
+/* $OpenBSD: machdep.c,v 1.16 1997/02/03 13:09:14 deraadt Exp $ */
/* $NetBSD: machdep.c,v 1.61 1996/12/07 01:54:49 cgd Exp $ */
/*
@@ -1134,10 +1134,12 @@ int sigpid = 0;
* Send an interrupt to process.
*/
void
-sendsig(catcher, sig, mask, code)
+sendsig(catcher, sig, mask, code, type, val)
sig_t catcher;
int sig, mask;
u_long code;
+ int type;
+ union sigval val;
{
struct proc *p = curproc;
struct sigcontext *scp, ksc;
diff --git a/sys/arch/alpha/alpha/trap.c b/sys/arch/alpha/alpha/trap.c
index 47620f99514..350ea38caf3 100644
--- a/sys/arch/alpha/alpha/trap.c
+++ b/sys/arch/alpha/alpha/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.6 1997/01/24 19:56:46 niklas Exp $ */
+/* $OpenBSD: trap.c,v 1.7 1997/02/03 13:09:16 deraadt Exp $ */
/* $NetBSD: trap.c,v 1.19 1996/11/27 01:28:30 cgd Exp $ */
/*
@@ -161,6 +161,10 @@ trap(a0, a1, a2, entry, framep)
goto out;
ucode = a0; /* VA */
+ if (i == SIGBUS)
+ typ = BUS_ADRALN;
+ else
+ typ = SEGV_MAPERR;
break;
}
@@ -185,7 +189,8 @@ trap(a0, a1, a2, entry, framep)
*/
if (user) {
sigfpe: i = SIGFPE;
- ucode = a0; /* exception summary */
+ vv = ucode = a0; /* exception summary */
+ typ = FPE_FLTINV; /* XXX? */
break;
}
@@ -208,6 +213,7 @@ sigfpe: i = SIGFPE;
case ALPHA_IF_CODE_BUGCHK:
ucode = a0; /* trap type */
i = SIGTRAP;
+ typ = TRAP_BRKPT;
break;
case ALPHA_IF_CODE_OPDEC:
@@ -222,6 +228,7 @@ panic("foo");
}
#endif
i = SIGILL;
+ typ = ILL_ILLOPC;
break;
case ALPHA_IF_CODE_FEN:
@@ -394,6 +401,7 @@ panic("foo");
}
ucode = a0;
i = SIGSEGV;
+ typ = SEGV_MAPERR;
break;
}
@@ -407,7 +415,7 @@ panic("foo");
goto dopanic;
}
- trapsignal(p, i, ucode);
+ trapsignal(p, i, ucode, typ, ucode);
out:
if (user)
userret(p, framep->tf_regs[FRAME_PC], sticks);
@@ -927,6 +935,7 @@ unaligned_fixup(va, opcode, reg, p)
* unaligned_{load,store}_* clears the signal flag.
*/
signal = SIGBUS;
+ typ = BUS_ADRALN;
if (dofix && size != 0) {
switch (opcode) {
#ifdef FIX_UNALIGNED_VAX_FP