Let's say I have a process that contains three threads: A, B, and C.
I want to use thread A to pause thread B, examine thread B's register values/stack contents, and then feed some of that information from thread B into thread C (via thread A).
According to this post from Linus Torvalds, the ptrace syscall won't work here because the threads are within the same process.
Is there another way of accomplishing this?
Update: this question discusses why it doesn't work; I'd like to know if a work-around exists that doesn't involve creating a child process.