From 7cf583d0921792e2c2f5b407cbab1650acbe98b8 Mon Sep 17 00:00:00 2001 From: deraadt Date: Mon, 27 Jan 1997 01:17:08 +0000 Subject: [PATCH] match svr4 siginfo changes --- sys/arch/i386/i386/svr4_machdep.c | 70 ++++++++++++++--------------- sys/arch/sparc/sparc/svr4_machdep.c | 44 +++++++++--------- 2 files changed, 57 insertions(+), 57 deletions(-) diff --git a/sys/arch/i386/i386/svr4_machdep.c b/sys/arch/i386/i386/svr4_machdep.c index 4bf2d9c5362..68b9cf259d7 100644 --- a/sys/arch/i386/i386/svr4_machdep.c +++ b/sys/arch/i386/i386/svr4_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: svr4_machdep.c,v 1.7 1996/10/17 19:34:24 niklas Exp $ */ +/* $OpenBSD: svr4_machdep.c,v 1.8 1997/01/27 01:17:08 deraadt Exp $ */ /* $NetBSD: svr4_machdep.c,v 1.24 1996/05/03 19:42:26 christos Exp $ */ /* @@ -218,84 +218,84 @@ svr4_getsiginfo(si, sig, code, addr) u_long code; caddr_t addr; { - si->si_signo = bsd_to_svr4_sig[sig]; - si->si_errno = 0; - si->si_addr = addr; + si->svr4_si_signo = bsd_to_svr4_sig[sig]; + si->svr4_si_errno = 0; + si->svr4_si_addr = addr; switch (code) { case T_PRIVINFLT: - si->si_code = SVR4_ILL_PRVOPC; - si->si_trap = SVR4_T_PRIVINFLT; + si->svr4_si_code = SVR4_ILL_PRVOPC; + si->svr4_si_trap = SVR4_T_PRIVINFLT; break; case T_BPTFLT: - si->si_code = SVR4_TRAP_BRKPT; - si->si_trap = SVR4_T_BPTFLT; + si->svr4_si_code = SVR4_TRAP_BRKPT; + si->svr4_si_trap = SVR4_T_BPTFLT; break; case T_ARITHTRAP: - si->si_code = SVR4_FPE_INTOVF; - si->si_trap = SVR4_T_DIVIDE; + si->svr4_si_code = SVR4_FPE_INTOVF; + si->svr4_si_trap = SVR4_T_DIVIDE; break; case T_PROTFLT: - si->si_code = SVR4_SEGV_ACCERR; - si->si_trap = SVR4_T_PROTFLT; + si->svr4_si_code = SVR4_SEGV_ACCERR; + si->svr4_si_trap = SVR4_T_PROTFLT; break; case T_TRCTRAP: - si->si_code = SVR4_TRAP_TRACE; - si->si_trap = SVR4_T_TRCTRAP; + si->svr4_si_code = SVR4_TRAP_TRACE; + si->svr4_si_trap = SVR4_T_TRCTRAP; break; case T_PAGEFLT: - si->si_code = SVR4_SEGV_ACCERR; - si->si_trap = SVR4_T_PAGEFLT; + si->svr4_si_code = SVR4_SEGV_ACCERR; + si->svr4_si_trap = SVR4_T_PAGEFLT; break; case T_ALIGNFLT: - si->si_code = SVR4_BUS_ADRALN; - si->si_trap = SVR4_T_ALIGNFLT; + si->svr4_si_code = SVR4_BUS_ADRALN; + si->svr4_si_trap = SVR4_T_ALIGNFLT; break; case T_DIVIDE: - si->si_code = SVR4_FPE_FLTDIV; - si->si_trap = SVR4_T_DIVIDE; + si->svr4_si_code = SVR4_FPE_FLTDIV; + si->svr4_si_trap = SVR4_T_DIVIDE; break; case T_OFLOW: - si->si_code = SVR4_FPE_FLTOVF; - si->si_trap = SVR4_T_DIVIDE; + si->svr4_si_code = SVR4_FPE_FLTOVF; + si->svr4_si_trap = SVR4_T_DIVIDE; break; case T_BOUND: - si->si_code = SVR4_FPE_FLTSUB; - si->si_trap = SVR4_T_BOUND; + si->svr4_si_code = SVR4_FPE_FLTSUB; + si->svr4_si_trap = SVR4_T_BOUND; break; case T_DNA: - si->si_code = SVR4_FPE_FLTINV; - si->si_trap = SVR4_T_DNA; + si->svr4_si_code = SVR4_FPE_FLTINV; + si->svr4_si_trap = SVR4_T_DNA; break; case T_FPOPFLT: - si->si_code = SVR4_FPE_FLTINV; - si->si_trap = SVR4_T_FPOPFLT; + si->svr4_si_code = SVR4_FPE_FLTINV; + si->svr4_si_trap = SVR4_T_FPOPFLT; break; case T_SEGNPFLT: - si->si_code = SVR4_SEGV_MAPERR; - si->si_trap = SVR4_T_SEGNPFLT; + si->svr4_si_code = SVR4_SEGV_MAPERR; + si->svr4_si_trap = SVR4_T_SEGNPFLT; break; case T_STKFLT: - si->si_code = SVR4_ILL_BADSTK; - si->si_trap = SVR4_T_STKFLT; + si->svr4_si_code = SVR4_ILL_BADSTK; + si->svr4_si_trap = SVR4_T_STKFLT; break; default: - si->si_code = 0; - si->si_trap = 0; + si->svr4_si_code = 0; + si->svr4_si_trap = 0; #ifdef DIAGNOSTIC printf("sig %d code %ld\n", sig, code); panic("svr4_getsiginfo"); @@ -355,7 +355,7 @@ svr4_sendsig(catcher, sig, mask, code) svr4_getcontext(p, &frame.sf_uc, mask, oonstack); svr4_getsiginfo(&frame.sf_si, sig, code, (caddr_t) tf->tf_eip); - frame.sf_signum = frame.sf_si.si_signo; + frame.sf_signum = frame.sf_si.svr4_si_signo; frame.sf_sip = &fp->sf_si; frame.sf_ucp = &fp->sf_uc; frame.sf_handler = catcher; diff --git a/sys/arch/sparc/sparc/svr4_machdep.c b/sys/arch/sparc/sparc/svr4_machdep.c index a16e126ab1c..6f8acd7fda0 100644 --- a/sys/arch/sparc/sparc/svr4_machdep.c +++ b/sys/arch/sparc/sparc/svr4_machdep.c @@ -339,70 +339,70 @@ svr4_getsiginfo(si, sig, code, addr) u_long code; caddr_t addr; { - si->si_signo = bsd_to_svr4_sig[sig]; - si->si_errno = 0; - si->si_addr = addr; + si->svr4_si_signo = bsd_to_svr4_sig[sig]; + si->svr4_si_errno = 0; + si->svr4_si_addr = addr; /* * we can do this direct map as they are the same as all sparc * architectures. */ - si->si_trap = code; + si->svr4_si_trap = code; switch (code) { case T_RESET: - si->si_code = 0; + si->svr4_si_code = 0; break; case T_TEXTFAULT: - si->si_code = SVR4_BUS_ADRALN; + si->svr4_si_code = SVR4_BUS_ADRALN; break; case T_ILLINST: - si->si_code = SVR4_ILL_ILLOPC; + si->svr4_si_code = SVR4_ILL_ILLOPC; break; case T_PRIVINST: - si->si_code = SVR4_ILL_PRVOPC; + si->svr4_si_code = SVR4_ILL_PRVOPC; break; case T_FPDISABLED: - si->si_code = SVR4_FPE_FLTINV; + si->svr4_si_code = SVR4_FPE_FLTINV; break; case T_ALIGN: - si->si_code = SVR4_BUS_ADRALN; + si->svr4_si_code = SVR4_BUS_ADRALN; break; case T_FPE: - si->si_code = SVR4_FPE_FLTINV; + si->svr4_si_code = SVR4_FPE_FLTINV; break; case T_DATAFAULT: - si->si_code = SVR4_BUS_ADRALN; + si->svr4_si_code = SVR4_BUS_ADRALN; break; case T_TAGOF: - si->si_code = SVR4_EMT_TAGOVF; + si->svr4_si_code = SVR4_EMT_TAGOVF; break; case T_CPDISABLED: - si->si_code = SVR4_FPE_FLTINV; + si->svr4_si_code = SVR4_FPE_FLTINV; break; case T_CPEXCEPTION: - si->si_code = SVR4_FPE_FLTINV; + si->svr4_si_code = SVR4_FPE_FLTINV; break; case T_DIV0: - si->si_code = SVR4_FPE_INTDIV; + si->svr4_si_code = SVR4_FPE_INTDIV; break; case T_INTOF: - si->si_code = SVR4_FPE_INTOVF; + si->svr4_si_code = SVR4_FPE_INTOVF; break; case T_BREAKPOINT: - si->si_code = SVR4_TRAP_BRKPT; + si->svr4_si_code = SVR4_TRAP_BRKPT; break; /* @@ -425,7 +425,7 @@ svr4_getsiginfo(si, sig, code, addr) case T_L13INT: case T_L14INT: case T_L15INT: - si->si_code = 0; + si->svr4_si_code = 0; break; /* @@ -439,11 +439,11 @@ svr4_getsiginfo(si, sig, code, addr) case T_SVR4_SYSCALL: case T_BSD_SYSCALL: case T_KGDB_EXEC: - si->si_code = 0; + si->svr4_si_code = 0; break; default: - si->si_code = 0; + si->svr4_si_code = 0; #ifdef DIAGNOSTIC printf("sig %d code %ld\n", sig, code); panic("svr4_getsiginfo"); @@ -501,7 +501,7 @@ svr4_sendsig(catcher, sig, mask, code) */ svr4_getsiginfo(&frame.sf_si, sig, code, (caddr_t) tf->tf_pc); svr4_getcontext(p, &frame.sf_uc, mask, oonstack); - frame.sf_signum = frame.sf_si.si_signo; + frame.sf_signum = frame.sf_si.svr4_si_signo; frame.sf_sip = &fp->sf_si; frame.sf_ucp = &fp->sf_uc; frame.sf_handler = catcher; -- 2.20.1