From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29956 invoked by alias); 30 Jan 2004 01:18:33 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 29914 invoked from network); 30 Jan 2004 01:18:31 -0000 Received: from unknown (HELO av.mvista.com) (12.44.186.158) by sources.redhat.com with SMTP; 30 Jan 2004 01:18:31 -0000 Received: from data.mvista.com (av [127.0.0.1]) by av.mvista.com (8.9.3/8.9.3) with ESMTP id RAA13632; Thu, 29 Jan 2004 17:18:27 -0800 Received: from mvista.com (localhost [127.0.0.1]) by data.mvista.com (8.12.5/8.12.5) with ESMTP id i0U1HcJO017924; Thu, 29 Jan 2004 17:17:44 -0800 Message-ID: <4019B0B2.2090609@mvista.com> Date: Fri, 30 Jan 2004 01:18:00 -0000 From: George Anzinger Organization: MontaVista Software User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021202 MIME-Version: 1.0 To: Andrew Cagney CC: Daniel Jacobowitz , "Amit S. Kale" , gdb@sources.redhat.com, kgdb-bugreport@lists.sourceforge.net Subject: Re: qL and qf remote packets [Re: [Kgdb-bugreport] Re: [discuss] kgdb-x86_64-1.6 for kernel 2.4.23] References: <200312261743.38980.amitkale@emsyssoft.com> <200312300937.48484.amitkale@emsyssoft.com> <20031230041859.GA29114@nevyn.them.org> <200312301811.29927.amitkale@emsyssoft.com> <20031230152803.GB13258@nevyn.them.org> <3FF322B6.30603@gnu.org> In-Reply-To: <3FF322B6.30603@gnu.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-01/txt/msg00337.txt.bz2 Andrew Cagney wrote: >> On Tue, Dec 30, 2003 at 06:11:29PM +0530, Amit S. Kale wrote: >> >>> While q[s/f] packet itself doesn't have pid wrap-around problem, I >>> can't figure out what will happen to gdb's database of threads in >>> following scenario. >>> >>> 1. GDB adds a thread with id 1500 to thread database. >>> 2. It finds that the thread has died later. >>> 3. Does it delete the thread from its database? >>> 4. It again finds a thread with id 1500 becase of wrapping around of >>> pid. If it has completely forgotten about previous thread in its >>> dabase, there shouldn't be any problem. >> >> >> >> Indeed, there won't be any problem. I believe that even if thread 1500 >> exists, and then dies and restarts between breakpoints, GDB still won't >> get confused. > > > The user might (eventually). They aren't going to be notified of thread > create/delete events. Also, it could leave around per-thread > breakpoings no longer applicable to that thread. I think this might be more of a problem in user land. In the kernel, first it is rare to reuse a pid, but still, if it is reused, it is expected. To help the user we also use the thread info command to insert the tasks name in the info thread command. -- George Anzinger george@mvista.com High-res-timers: http://sourceforge.net/projects/high-res-timers/ Preemption patch: http://www.kernel.org/pub/linux/kernel/people/rml