From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 18 07:57:30 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6BDEC37B401 for ; Fri, 18 Jul 2003 07:57:30 -0700 (PDT) Received: from fed1mtao01.cox.net (fed1mtao01.cox.net [68.6.19.244]) by mx1.FreeBSD.org (Postfix) with ESMTP id C976E43F93 for ; Fri, 18 Jul 2003 07:57:29 -0700 (PDT) (envelope-from kevin@wooten.com) Received: from wooten.com ([68.2.41.222]) by fed1mtao01.cox.net (InterMail vM.5.01.04.05 201-253-122-122-105-20011231) with ESMTP id <20030718145729.CWRM7643.fed1mtao01.cox.net@wooten.com> for ; Fri, 18 Jul 2003 10:57:29 -0400 Message-ID: <3F180A6D.4010000@wooten.com> Date: Fri, 18 Jul 2003 07:55:41 -0700 From: Kevin Wooten User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: hackers@freebsd.org References: <3F17677C.4090200@wooten.com> <20030718132404.GA60116@BSDWins.Com> In-Reply-To: <20030718132404.GA60116@BSDWins.Com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: ptrace & threads X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jul 2003 14:57:30 -0000 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