From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11339 invoked by alias); 15 Aug 2007 19:33:12 -0000 Received: (qmail 11281 invoked by uid 22791); 15 Aug 2007 19:33:10 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 15 Aug 2007 19:33:04 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id C493A2AA5C0 for ; Wed, 15 Aug 2007 15:33:02 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id E9g4V9I-wMAI for ; Wed, 15 Aug 2007 15:33:02 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 8BFDA2AA5AD for ; Wed, 15 Aug 2007 15:33:02 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 1ECA6E7B54; Wed, 15 Aug 2007 12:36:49 -0700 (PDT) Date: Wed, 15 Aug 2007 19:33:00 -0000 From: Joel Brobecker To: gdb@sourceware.org Subject: debugging threads on 64bit GNU/Linux with 32bit debugger? Message-ID: <20070815193649.GH24369@adacore.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.2i 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/msg00128.txt.bz2 Hello, I have a feeling this is a familiar question, but I'm still unsure at the answer after my searches on this list as well as on the general web. 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 version info of the C library our application is using reads: % /lib/tls/libc.so.6 GNU C Library stable release version 2.3.5 (20050720), by Roland McGrath et +al. Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Configured for i686-suse-linux. Compiled by GNU CC version 3.3.3 (SuSE Linux). Compiled on a Linux 2.6.5 system on 2006-08-09. Available extensions: GNU libio by Per Bothner crypt add-on version 2.1 by Michael Glad and others Native POSIX Threads Library by Ulrich Drepper et al GNU Libidn by Simon Josefsson NoVersion patch for broken glibc 2.0 binaries BIND-8.2.3-T5B NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk Thread-local storage support included. For bug reporting instructions, please see: . Is our setup supposed to work? Is this a known issue of this version of the libc (I saw that glibc is now at version 2.6)? Any hint? Thanks a lot, -- Joel