ptrace & threads
kevin at wooten.com
Fri Jul 18 07:57:30 PDT 2003
>----- Julian Elischer's Original Message -----
>>It is teh nextthing to look at..
>>The ptrace interface doesn't extend to coverthreads at all.
>>We willneed to design somewhole new system..
>>One posibility is the benedict arnold thread(*), that
>>talks with the debugger and controlls teh other threads..
>Well, hoping not to create a NIH discussion, but OS/2 had/has
>a nice interface for thread debugging. Used it years ago as
>a model for setting up an environment on the mainframe (vm).
>One thing to remember, a failed thread on one cpu has no effect
>on any threads running on other physicals. You literally
>need a way to control how many threads can run in parallel, how
>many physical cpus they can use, and in some circumstances,
I believe that on Linux there is a different process id for different
kernel threads, is that the same, or is there a parallel for FreeBSD 5
(4.x uses user threads correct?). If that is true, could ptrace allow
you to use a process id for a specific thread instead of the entire
process. Then a signal (for traced processes) whenever a thread is
started or stopped, and you should be able to control the state of
threads. This is probably somewhat simplistic since I do not understand
the whole KSE thing (but it sounds great). I am very interested in
making GDB support threading very intuitively, as it is a big pain write
now. For FreeBSD 4.x, could the idea Julian had (benedict arnold
thread), be used to control the user threads library.
More information about the freebsd-hackers