Subject: Re: SIGTRAP for traced processes and COMPAT_MACH
To: Emmanuel Dreyfus <manu@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: tech-kern
Date: 11/30/2003 19:02:18
On Nov 27,  8:12am, manu@netbsd.org (Emmanuel Dreyfus) wrote:
-- Subject: Re: SIGTRAP for traced processes and COMPAT_MACH

| > Is that the single case you need to do this though? What about SIGIO?
| > Let's think about this now, before we end up having to kludge things more.
| 
| I have no idea yet of what happens with SIGIO, but I guess we'll run
| into the same problem: calling the usaual signal code path is
| unappropriate since it will filter out exceptions when the signal mask
| filter the signal.
| 
| The easy fix is to call trapsignal, but it has some drawbaks on the
| performance front. Doing so for a traced process is not such a problem
| as you might not expect full performance when you debug, bug SIGIO is
| another story. What do you think?
| 
| Maybe we should ifdef COMPAT_MACH in kernel code to call trapsignal
| instead of the regular code path?

I am against ifdefs in the mi code. This could be handled with another
entry point in struct emul, but we have to make sure it is really needed
and it is not a one-off where we could get by using trapsignal. That is
why I was asking about SIGIO.

christos