If p->emul->e_usertrap is set, call it for T_USER|T_PAGEFAULT traps to
do possible work.
This commit is contained in:
parent
33e2d79f47
commit
a893ac9f67
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: trap.c,v 1.19 2004/08/28 17:53:00 jdolecek Exp $ */
|
||||
/* $NetBSD: trap.c,v 1.20 2005/05/20 12:49:14 fvdl Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
|
||||
|
@ -75,7 +75,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.19 2004/08/28 17:53:00 jdolecek Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.20 2005/05/20 12:49:14 fvdl Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
|
@ -154,6 +154,8 @@ int trapdebug = 0;
|
|||
|
||||
#define IDTVEC(name) __CONCAT(X, name)
|
||||
|
||||
#undef TRAP_SIGDEBUG
|
||||
|
||||
#ifdef TRAP_SIGDEBUG
|
||||
static void frame_dump(struct trapframe *);
|
||||
#endif
|
||||
|
@ -439,6 +441,9 @@ copyfault:
|
|||
extern struct vm_map *kernel_map;
|
||||
|
||||
cr2 = rcr2();
|
||||
if (p->p_emul->e_usertrap != NULL &&
|
||||
(*p->p_emul->e_usertrap)(l, cr2, frame) != 0)
|
||||
return;
|
||||
KERNEL_PROC_LOCK(l);
|
||||
if (l->l_flag & L_SA) {
|
||||
l->l_savp->savp_faultaddr = (vaddr_t)cr2;
|
||||
|
|
Loading…
Reference in New Issue