From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15692 invoked by alias); 4 May 2009 00:07:01 -0000 Received: (qmail 15679 invoked by uid 22791); 4 May 2009 00:07:00 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from ti-out-0910.google.com (HELO ti-out-0910.google.com) (209.85.142.187) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 04 May 2009 00:06:51 +0000 Received: by ti-out-0910.google.com with SMTP id a1so316263tib.12 for ; Sun, 03 May 2009 17:06:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.110.16.15 with SMTP id 15mr384186tip.53.1241395607938; Sun, 03 May 2009 17:06:47 -0700 (PDT) In-Reply-To: <20090430185551.GB10734@adacore.com> References: <8ac60eac0904201019g7ba8056bx5e84e6bfdf5935d8@mail.gmail.com> <8ac60eac0904201208m95d4585k2b09f6b6fe5edb40@mail.gmail.com> <20090422172517.GA17235@caradoc.them.org> <8ac60eac0904221810x24763ecaj4a888927b766e7f7@mail.gmail.com> <8ac60eac0904230001w1afd9179wcb76e1cfd7f3f386@mail.gmail.com> <8ac60eac0904291330m78b43c47p1cc9b8379e31e923@mail.gmail.com> <20090430185551.GB10734@adacore.com> Date: Mon, 04 May 2009 00:07:00 -0000 Message-ID: Subject: Re: [patch][rfc] Allow GDB to search for the right libthread_db.so.1 From: Hui Zhu To: Joel Brobecker Cc: 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-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-05/txt/msg00053.txt.bz2 On Fri, May 1, 2009 at 02:55, Joel Brobecker wrote: > 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 >> =A0 =A0libthread_db from the same directory where libpthread was loaded = in the >> =A0 =A0inferior. > > 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. =A0Otherwise, 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 somewha= t, >> 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. If we can let user create a slink here, User can create slink to right lib with themselves. Maybe they don't need set libthread_db_search_path then.