From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30727 invoked by alias); 29 Apr 2009 20:30:19 -0000 Received: (qmail 30719 invoked by uid 22791); 29 Apr 2009 20:30:19 -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; Wed, 29 Apr 2009 20:30:14 +0000 Received: from spaceape24.eur.corp.google.com (spaceape24.eur.corp.google.com [172.28.16.76]) by smtp-out.google.com with ESMTP id n3TKUA18017307 for ; Wed, 29 Apr 2009 21:30:10 +0100 Received: from wf-out-1314.google.com (wfd26.prod.google.com [10.142.4.26]) by spaceape24.eur.corp.google.com with ESMTP id n3TKU8dm002812 for ; Wed, 29 Apr 2009 13:30:09 -0700 Received: by wf-out-1314.google.com with SMTP id 26so1037921wfd.4 for ; Wed, 29 Apr 2009 13:30:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.211.7 with SMTP id j7mr176666wfg.306.1241037008002; Wed, 29 Apr 2009 13:30:08 -0700 (PDT) In-Reply-To: References: <1239225742.8871.145.camel@localhost.localdomain> <8ac60eac0904201019g7ba8056bx5e84e6bfdf5935d8@mail.gmail.com> <20090420180352.GA14206@caradoc.them.org> <8ac60eac0904201208m95d4585k2b09f6b6fe5edb40@mail.gmail.com> <20090422172517.GA17235@caradoc.them.org> <8ac60eac0904221810x24763ecaj4a888927b766e7f7@mail.gmail.com> <8ac60eac0904230001w1afd9179wcb76e1cfd7f3f386@mail.gmail.com> Date: Wed, 29 Apr 2009 20:30:00 -0000 Message-ID: <8ac60eac0904291330m78b43c47p1cc9b8379e31e923@mail.gmail.com> Subject: Re: [patch][rfc] Allow GDB to search for the right libthread_db.so.1 From: Paul Pluzhnikov To: Hui Zhu Cc: tromey@redhat.com, Thiago Jung Bauermann , gdb-patches ml , Eli Zaretskii Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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/msg00795.txt.bz2 On Thu, Apr 23, 2009 at 4:32 AM, Hui Zhu wrote: > In function thread_db_load, I suggest try_thread_db_load with > libthread_db_search_path first. > Cause I think if user set a directory, he must want it be loaded. Hui made two suggestions: 1. If libthread_db_search_path is set, use it *before* trying to load libthread_db from the same directory where libpthread was loaded in the inferior. 2. Allow libthread_db_search_path contain files as well as directories. Both are (IMHO) reasonable, though I don't particularly like either. Implementing 1) will cause a bit of searching, because most of the time the libthread_db which "parallels" libpthread is the right one (at least for us), and the search is really there mostly for static executables (which are somewhat rare here). Implementing 2) "clouds" the meaning of libthread_db_search_path somewhat, and it is quite unlikely (though certainlyh possible) that libthread_db will be called anything other than libthread_db.so.1 on Linux. Comments? Thanks, -- Paul Pluzhnikov