From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20270 invoked by alias); 30 Apr 2009 18:56:10 -0000 Received: (qmail 20261 invoked by uid 22791); 30 Apr 2009 18:56:10 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 30 Apr 2009 18:56:04 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id BE6782BABC4; Thu, 30 Apr 2009 14:56: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 tNNeBP679Jbc; Thu, 30 Apr 2009 14:56:02 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 8ECD12BAC21; Thu, 30 Apr 2009 14:55:58 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id D71A5F58FF; Thu, 30 Apr 2009 11:55:51 -0700 (PDT) Date: Thu, 30 Apr 2009 18:56:00 -0000 From: Joel Brobecker To: Paul Pluzhnikov Cc: Hui Zhu , 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: <20090430185551.GB10734@adacore.com> References: <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> <8ac60eac0904291330m78b43c47p1cc9b8379e31e923@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8ac60eac0904291330m78b43c47p1cc9b8379e31e923@mail.gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) 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/msg00818.txt.bz2 Just my 2 cents, from an outsider's point of view: > 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. >From my naive perspective (never really had a need for this feature), it seems better to check the path before checking the path that was used by the inferior. Otherwise, if the local host has a library at the same location but that's different from the library used by the inferior, we wouldn't be able to force the debugger to use a different library, would we? > 2. Allow libthread_db_search_path contain files as well as directories. [...] > 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. This one seems much less important, if at all, to me, especially if it is unlikely that libthread_db might have a different name. And even in this case, it's easy to create a symbolic link in a user area, and update the path to point to that directory. -- Joel