From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16224 invoked by alias); 23 Oct 2008 18:31:49 -0000 Received: (qmail 16216 invoked by uid 22791); 23 Oct 2008 18:31:49 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-outbound-1.vmware.com (HELO smtp-outbound-1.vmware.com) (65.115.85.69) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 23 Oct 2008 18:31:16 +0000 Received: from mailhost2.vmware.com (mailhost2.vmware.com [10.16.67.167]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id E99CA57001; Thu, 23 Oct 2008 11:31:12 -0700 (PDT) Received: from [10.20.92.59] (promb-2s-dhcp59.eng.vmware.com [10.20.92.59]) by mailhost2.vmware.com (Postfix) with ESMTP id D121A8E564; Thu, 23 Oct 2008 11:31:12 -0700 (PDT) Message-ID: <4900C1CC.20002@vmware.com> Date: Thu, 23 Oct 2008 18:31:00 -0000 From: Michael Snyder User-Agent: Thunderbird 1.5.0.12 (X11/20080411) MIME-Version: 1.0 To: Lukasz Lempart , gdb@sourceware.org Subject: Re: gdb and cloned process References: <4ced24c0810221709u17575bf3s73994724c456e956@mail.gmail.com> <20081023030548.GA21266@caradoc.them.org> In-Reply-To: <20081023030548.GA21266@caradoc.them.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-10/txt/msg00112.txt.bz2 Daniel Jacobowitz wrote: > On Wed, Oct 22, 2008 at 05:09:32PM -0700, Lukasz Lempart wrote: >> How does gdb (through libthread_db) figure out what threads belong to a process? > > The thread library maintains an internal list of threads. If you've > cloned the process, without telling the C library about that, you're > going to end up with the same list of threads; so the behavior you > describe is not surprising. > >> Is there currently a way to disable thread debugging in gdb? > > Not really. You might be able to preload a dummy libthread_db.so.1 > that always failed to detect new threads. What if you strip libthread.so? Isn't that supposed to cause thread debugging to fail?