Adapt ARM Linux compat code to deal with SIGINFO.

This commit is contained in:
matt 2003-10-10 14:44:42 +00:00
parent 1374e2efc0
commit 0dbe439e05
3 changed files with 17 additions and 14 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_trap.c,v 1.3 2003/07/15 00:24:39 lukem Exp $ */
/* $NetBSD: linux_trap.c,v 1.4 2003/10/10 14:44:42 matt Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_trap.c,v 1.3 2003/07/15 00:24:39 lukem Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_trap.c,v 1.4 2003/10/10 14:44:42 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -51,6 +51,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_trap.c,v 1.3 2003/07/15 00:24:39 lukem Exp $")
#include <compat/linux/common/linux_exec.h>
void
linux_trapsignal(struct lwp *l, int signo, u_long type) {
trapsignal(l, signo, type);
linux_trapsignal(struct lwp *l, const ksiginfo_t *ksi)
{
trapsignal(l, ksi);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_machdep.c,v 1.12 2003/09/26 12:02:57 simonb Exp $ */
/* $NetBSD: linux_machdep.c,v 1.13 2003/10/10 14:44:42 matt Exp $ */
/*-
* Copyright (c) 1995, 2000 The NetBSD Foundation, Inc.
@ -38,7 +38,7 @@
#include <sys/param.h>
__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.12 2003/09/26 12:02:57 simonb Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.13 2003/10/10 14:44:42 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -94,16 +94,14 @@ process_frame(struct lwp *l)
}
void
linux_sendsig(sig, mask, code)
int sig;
const sigset_t *mask;
u_long code;
linux_sendsig(const ksiginfo_t *ksi, const sigset_t *mask)
{
struct lwp *l = curlwp;
struct proc *p = l->l_proc;
struct trapframe *tf;
struct linux_sigframe *fp, frame;
int onstack;
const int sig = ksi->ksi_signo;
sig_t catcher = SIGACTION(p, sig).sa_handler;
tf = process_frame(l);
@ -163,7 +161,7 @@ linux_sendsig(sig, mask, code)
*/
frame.sf_sc.sc_trapno = 0;
frame.sf_sc.sc_error_code = 0;
frame.sf_sc.sc_fault_address = code;
frame.sf_sc.sc_fault_address = (u_int32_t) ksi->ksi_addr;
if (copyout(&frame, fp, sizeof(frame)) != 0) {
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_sys_machdep.c,v 1.8 2003/01/18 08:02:47 thorpej Exp $ */
/* $NetBSD: linux_sys_machdep.c,v 1.9 2003/10/10 14:44:42 matt Exp $ */
/*-
* Copyright (c) 2002 Ben Harris
@ -29,7 +29,7 @@
#include <sys/param.h>
__KERNEL_RCSID(0, "$NetBSD: linux_sys_machdep.c,v 1.8 2003/01/18 08:02:47 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_sys_machdep.c,v 1.9 2003/10/10 14:44:42 matt Exp $");
#include <sys/systm.h>
@ -44,8 +44,12 @@ __KERNEL_RCSID(0, "$NetBSD: linux_sys_machdep.c,v 1.8 2003/01/18 08:02:47 thorpe
int
linux_sys_breakpoint(struct lwp *l, void *v, register_t *retval)
{
ksiginfo_t ksi;
trapsignal(l, SIGTRAP, 0);
KSI_INIT_TRAP(&ksi);
ksi.ksi_signo = SIGTRAP;
ksi.ksi_code = TRAP_BRKPT;
trapsignal(l, &ksi);
return ERESTART; /* Leave PC pointing back at the breakpoint. */
}