Subject: Re: SIGTRAP for traced processes and COMPAT_MACH
To: None <>
From: Christos Zoulas <>
List: tech-kern
Date: 11/25/2003 19:33:56
In article <>,
Emmanuel Dreyfus <> wrote:
>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.