From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20011 invoked by alias); 23 Oct 2008 03:06:32 -0000 Received: (qmail 20000 invoked by uid 22791); 23 Oct 2008 03:06:31 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 23 Oct 2008 03:05:51 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 6A5D410A2D; Thu, 23 Oct 2008 03:05:49 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id 50648104E2; Thu, 23 Oct 2008 03:05:49 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1KsqWC-0005XM-40; Wed, 22 Oct 2008 23:05:48 -0400 Date: Thu, 23 Oct 2008 03:06:00 -0000 From: Daniel Jacobowitz To: Lukasz Lempart Cc: gdb@sourceware.org Subject: Re: gdb and cloned process Message-ID: <20081023030548.GA21266@caradoc.them.org> Mail-Followup-To: Lukasz Lempart , gdb@sourceware.org References: <4ced24c0810221709u17575bf3s73994724c456e956@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4ced24c0810221709u17575bf3s73994724c456e956@mail.gmail.com> User-Agent: Mutt/1.5.17 (2008-05-11) 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/msg00099.txt.bz2 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. -- Daniel Jacobowitz CodeSourcery