I have a debugger application called hyper-ptrace. It launches user_appl3that is multi-threaded with NPTL.
The main hyper-ptrace loop:
wait3(&status, FLAGS, &u);
switch (signal = WSTOPSIG(status))
{
case SIGTRAP:
do_some_analysis_of_the_child(pid, &status)
break;
}
ptrace(PTRACE_CONT, pid);
SIGTRAP is generated for user_appl3 using hardware at a certain periodic interval for each thread and delivered to some thread. The interval can be 100..1 ms or even less. This is a kind of clock with an interrupt processor. Each thread runs only on its own processor (attached to affinity).
So there is question1 :
If thread1 receives TRAP and the debugger enters do_some_analysis_of_the_child, (therefore, the debugger does not execute wait3for the second thread), and after a while thread2 also receives TRAP, what will the Linux kernel do?
-: thread1 , , . thread2 (?). thread2 , , TRAP 2, . ?
: question2:
hyper-ptrace, ?
, . .
. , .
!