| I am using ptrace to try to attach to a process (one of a group of
| processes which I assume is using threads) to read back it's program
| counter so I can profile it. This works ok on a normal single threaded
| process. But, when I try this on a child process of a group (which I
| guess are threads - I am trying to look at mysqld) I cannot seem to
| attach. If I try gdb on it, it causes the process to die. If I call ptrace
| on it, I can attach but I cannot access the registers. Is there some
| restriction using ptrace on child processes in a thread group?
The only thought I can share is that you want to be sure you have the
latest version. The newest strace I found on freshmeat, and the 2.4.6
kernel, play together far better for threads than earlier versions.
If you are lucky there might be a better version of ptrace, or a newer
kernel might help.
Just a thought to help until someone who has more info joins in ;-)
"In elementary school, in case of fire you have to line up quietly in a
single file line from smallest to tallest. What is the logic? Do tall
people burn slower?"