From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16558 invoked by alias); 20 Apr 2009 18:04:03 -0000 Received: (qmail 16284 invoked by uid 22791); 20 Apr 2009 18:04:01 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 20 Apr 2009 18:03:56 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 0081C10A05; Mon, 20 Apr 2009 18:03:53 +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 9D1751018E; Mon, 20 Apr 2009 18:03:53 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1LvxqS-0003ml-T9; Mon, 20 Apr 2009 14:03:52 -0400 Date: Mon, 20 Apr 2009 18:04:00 -0000 From: Daniel Jacobowitz To: Paul Pluzhnikov Cc: tromey@redhat.com, Thiago Jung Bauermann , gdb-patches ml , Eli Zaretskii Subject: Re: [patch][rfc] Allow GDB to search for the right libthread_db.so.1 Message-ID: <20090420180352.GA14206@caradoc.them.org> Mail-Followup-To: Paul Pluzhnikov , tromey@redhat.com, Thiago Jung Bauermann , gdb-patches ml , Eli Zaretskii 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> <8ac60eac0904201019g7ba8056bx5e84e6bfdf5935d8@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8ac60eac0904201019g7ba8056bx5e84e6bfdf5935d8@mail.gmail.com> User-Agent: Mutt/1.5.17 (2008-05-11) 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/msg00524.txt.bz2 On Mon, Apr 20, 2009 at 10:19:49AM -0700, Paul Pluzhnikov wrote: > 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 :-( Right. For a long time -static selected LinuxThreads but runtime generally selected NPTL. Thus the search. > >> The symbol lookup works for statically linked executables ... > > > > I see.  Do 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. I don't see why you need the symbol list for this; shouldn't we do the search at the same time we'd previously have pushed libthread_db? We went through a lot of pain to get the timing right for both dynamic and static binaries. -- Daniel Jacobowitz CodeSourcery