Subject: Re: SIGTRAP for traced processes and COMPAT_MACH
To: None <tech-kern@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: tech-kern
Date: 11/25/2003 19:33:56
In article <1g4zr8d.zqnayv1xq0i4zM%manu@netbsd.org>,
Emmanuel Dreyfus <manu@netbsd.org> wrote:
>Hi
>
>In the wonderful world of MacOS X, signals can be replaced by
>exceptions. Exceptions are Mach messages sent to a process to notify an
>exceptionnal condition.
>
>For instance, when gdb traces a program, it does not wait for signals,
>it waits for Mach messages. This makes my job a bit complicated, but
>fortunately, trapsignal() can be emulation specific already. I just
>intercept signals at trapsignal() level I and transform them into
>exception, if the tracer process required so. The code for this already
>exists and it works.
>
>I have one special problem with the SIGTRAP emission in
>sys/kern/kern_exec:sys_execve(), for traced processes. It is currently
>done with psignal(), which offers no hook for emulations. What about the
>following patch?
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.
christos