Date: Fri, 18 Jul 2003 07:55:41 -0700 From: Kevin Wooten <kevin@wooten.com> To: hackers@freebsd.org Subject: Re: ptrace & threads Message-ID: <3F180A6D.4010000@wooten.com> In-Reply-To: <20030718132404.GA60116@BSDWins.Com> References: <3F17677C.4090200@wooten.com> <Pine.BSF.4.21.0307172219080.87910-100000@InterJet.elischer.org> <20030718132404.GA60116@BSDWins.Com>
next in thread | previous in thread | raw e-mail | index | archive | help
John wrote: >----- 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, >logicals. > >-John > > > 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. -kw
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3F180A6D.4010000>