From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31160 invoked by alias); 20 Apr 2009 17:20:11 -0000 Received: (qmail 31152 invoked by uid 22791); 20 Apr 2009 17:20:10 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 20 Apr 2009 17:20:06 +0000 Received: from zps19.corp.google.com (zps19.corp.google.com [172.25.146.19]) by smtp-out.google.com with ESMTP id n3KHK2pt002312 for ; Mon, 20 Apr 2009 18:20:02 +0100 Received: from qyk17 (qyk17.prod.google.com [10.241.83.145]) by zps19.corp.google.com with ESMTP id n3KHJpxs031546 for ; Mon, 20 Apr 2009 10:20:00 -0700 Received: by qyk17 with SMTP id 17so858478qyk.18 for ; Mon, 20 Apr 2009 10:20:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.85.1 with SMTP id m1mr590394qcl.56.1240247989495; Mon, 20 Apr 2009 10:19:49 -0700 (PDT) In-Reply-To: <20090420170154.GA10112@caradoc.them.org> References: <20090406203920.CCD6F19C4EC@localhost> <1239225742.8871.145.camel@localhost.localdomain> <8ac60eac0904101205h76d8377cv843db8177e74f8af@mail.gmail.com> <8ac60eac0904171213p4c075224x5f5c3661d240f383@mail.gmail.com> <20090420131751.GA25075@caradoc.them.org> <8ac60eac0904200947y2acca97arc1a0fc61530357a0@mail.gmail.com> <20090420170154.GA10112@caradoc.them.org> Date: Mon, 20 Apr 2009 17:20:00 -0000 Message-ID: <8ac60eac0904201019g7ba8056bx5e84e6bfdf5935d8@mail.gmail.com> Subject: Re: [patch][rfc] Allow GDB to search for the right libthread_db.so.1 From: Paul Pluzhnikov To: Paul Pluzhnikov , tromey@redhat.com, Thiago Jung Bauermann , gdb-patches ml , Eli Zaretskii Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-04/txt/msg00520.txt.bz2 On Mon, Apr 20, 2009 at 10:01 AM, Daniel Jacobowitz wrote: >> Could you tell a bit more about this? I thought out set up with >> multiple incompatible (WRT libthread_db) libc versions was more an >> exception than the rule. > > LinuxThreads and NPTL on the same system. =A0It's a lot less common now > - which is why I was going to let the patch fade away instead of > merging it - but I used to need this regularly. Oh, right. If the executable selects LinuxThreads via something like LD_ASSUME_KERNEL, then GDB must also be invoked with the same, or it will bind to the wrong libthread_db. And of course "old" static threaded binaries will continue to use LinuxThreads forever :-( >> The symbol lookup works for statically linked executables ... > > I see. =A0Do you ship a libthread_db.so alongside a static executable? Generally we don't ship anything to the outside world (with the exception of Google search appliance). For our production environment, we already have several versions of libthread_db.so installed in known locations, and (with this patch) it's just a matter of iterating over possible locations until the right libthread_db is found. --=20 Paul Pluzhnikov