diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index d29cc079366c..0eb46ee99ed4 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -645,7 +645,7 @@ trap(frame) if (*p->p_sysent->sv_transtrap) i = (*p->p_sysent->sv_transtrap)(i, type); - trapsignal(p, i, ucode); + trapsignal(td, i, ucode); #ifdef DEBUG if (type <= MAX_TRAP_MSG) { @@ -1071,7 +1071,7 @@ syscall(frame) */ if ((orig_tf_eflags & PSL_T) && !(orig_tf_eflags & PSL_VM)) { frame.tf_eflags &= ~PSL_T; - trapsignal(p, SIGTRAP, 0); + trapsignal(td, SIGTRAP, 0); } /* diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c index d29cc079366c..0eb46ee99ed4 100644 --- a/sys/i386/i386/trap.c +++ b/sys/i386/i386/trap.c @@ -645,7 +645,7 @@ trap(frame) if (*p->p_sysent->sv_transtrap) i = (*p->p_sysent->sv_transtrap)(i, type); - trapsignal(p, i, ucode); + trapsignal(td, i, ucode); #ifdef DEBUG if (type <= MAX_TRAP_MSG) { @@ -1071,7 +1071,7 @@ syscall(frame) */ if ((orig_tf_eflags & PSL_T) && !(orig_tf_eflags & PSL_VM)) { frame.tf_eflags &= ~PSL_T; - trapsignal(p, SIGTRAP, 0); + trapsignal(td, SIGTRAP, 0); } /*