From 2079e3b2b54013b3fc5dc53fba5f87b23a6d4edd Mon Sep 17 00:00:00 2001 From: manu Date: Tue, 18 Nov 2003 11:20:34 +0000 Subject: [PATCH] SIGTRAP is used for breakpoints --- sys/compat/mach/mach_notify.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/compat/mach/mach_notify.c b/sys/compat/mach/mach_notify.c index b839c16fb5a4..881d245f5d44 100644 --- a/sys/compat/mach/mach_notify.c +++ b/sys/compat/mach/mach_notify.c @@ -1,4 +1,4 @@ -/* $NetBSD: mach_notify.c,v 1.5 2003/11/18 01:40:18 manu Exp $ */ +/* $NetBSD: mach_notify.c,v 1.6 2003/11/18 11:20:34 manu Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mach_notify.c,v 1.5 2003/11/18 01:40:18 manu Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mach_notify.c,v 1.6 2003/11/18 11:20:34 manu Exp $"); #include "opt_ktrace.h" #include "opt_compat_mach.h" /* For COMPAT_MACH in */ @@ -215,12 +215,14 @@ mach_trapsignal1(l, ksi) const struct ksiginfo *ksi; { struct proc *p = l->l_proc; - struct mach_emuldata *med = (struct mach_emuldata *)p->p_emuldata; + struct mach_emuldata *med; struct mach_port *exc_port; struct mach_right *task; struct mach_right *thread; int exc_no; + med = (struct mach_emuldata *)p->p_emuldata; + /* XXX Thread and task should have different ports */ task = mach_right_get(med->med_kernel, l, MACH_PORT_TYPE_SEND, 0); thread = mach_right_get(med->med_kernel, l, MACH_PORT_TYPE_SEND, 0); @@ -237,7 +239,7 @@ mach_trapsignal1(l, ksi) exc_no = MACH_EXC_BAD_ACCESS; break; case SIGTRAP: - exc_no = MACH_EXC_SOFTWARE; + exc_no = MACH_EXC_BREAKPOINT; break; default: /* SIGCHLD, SIGPOLL */ return EINVAL;