On Feb 3,  3:55pm, Kurt wrote:
>
>are there any tools for debugging programs that use of the clone() call
>for creating kernel threads?
>
   I've always just used gdb. I have the thread I'm interested in sleep
for 20 seconds or so just after it starts up. In another window, I take a
ps listing and look for the PID of the process (i.e. thread) which is
asleep and has the appropriate name. Then, into gdb, use the "file"
command to load up the symbol table for source access, and "attach PID"
to connect to the thread. From there, I continue the thread, and debug it
as appropriate. Note that this technique works very poorly or not at all
if you have races or other timing-critical bugs. In that case, almost
anything you do, including putting in diagnostic print statements in the
code, can cause you problems in debugging.
   Does "strace -f" follow clone() calls?


-- 
 Christopher Neufeld               [EMAIL PROTECTED]
 Home page:  http://caliban.physics.utoronto.ca/neufeld/
 "Don't edit reality for the sake of simplicity"
-
Linux SMP list: FIRST see FAQ at http://www.irisa.fr/prive/dmentre/smp-howto/
To Unsubscribe: send "unsubscribe linux-smp" to [EMAIL PROTECTED]

Reply via email to