From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29557 invoked by alias); 15 Aug 2007 19:43:48 -0000 Received: (qmail 29546 invoked by uid 22791); 15 Aug 2007 19:43:47 -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; Wed, 15 Aug 2007 19:43:42 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 45E9198311; Wed, 15 Aug 2007 19:43:42 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 202A19812E; Wed, 15 Aug 2007 19:43:42 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.67) (envelope-from ) id 1ILOmJ-0000au-MN; Wed, 15 Aug 2007 15:43:39 -0400 Date: Wed, 15 Aug 2007 19:43:00 -0000 From: Daniel Jacobowitz To: Joel Brobecker Cc: gdb@sourceware.org Subject: Re: debugging threads on 64bit GNU/Linux with 32bit debugger? Message-ID: <20070815194339.GA2269@caradoc.them.org> Mail-Followup-To: Joel Brobecker , gdb@sourceware.org References: <20070815193649.GH24369@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070815193649.GH24369@adacore.com> User-Agent: Mutt/1.5.15 (2007-04-09) 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: 2007-08/txt/msg00129.txt.bz2 On Wed, Aug 15, 2007 at 12:36:49PM -0700, Joel Brobecker wrote: > Here is the situation: We're using a gcc/gdb toolset built on a 32bit > x86-linux machine. We're using this toolset on a 64bit machine running > a 64bit GNU/Linux machine. The resulting executable is runing in 32bit > compatibility mode. > > Everything seems to be working fine, except that we're having trouble > debugging threaded apps. The thread library used is the NPTL, and the > debugger is reporting to use what seems to be the correct (32bit) > instance of the libthread_db library (the 32bit version in /lib/tls, > not the one in /lib64/tls). > > The debugger fails at startup time saying: > > [Thread debugging using libthread_db enabled] > Cannot find new threads: generic error The answer is that you need a bunch of kernel patches for this to work. You may want to try a very current kernel; I don't know when the patches were applied, but I believe they have been at this point. It was probably some point between 2.6.17 and 2.6.22. -- Daniel Jacobowitz CodeSourcery