Robert Lunnon bobl@optushome.com.au writes:
I need some help to implement the debugger under Solaris. In particular I need help with how ptrace interacts with the threading model under Linux which I understand uses processes for threads. Since Solaris has user mode threads, stopping a pid stops all the threads in the debugee which used to deadlock the debugger. This suggests I need to operate on threads within processes rather than the processes themselves. This is possible with a few IPC tricks, but I need to understand the semantics
Stopping the whole process with ptrace is not a problem, that's how Linux NPTL behaves too. What you really need is the ability to change registers and send signals to a specific thread, which requires the kernel to at least know something about the individual threads.