From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27343 invoked by alias); 23 Apr 2009 07:01:40 -0000 Received: (qmail 26917 invoked by uid 22791); 23 Apr 2009 07:01:38 -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; Thu, 23 Apr 2009 07:01:32 +0000 Received: from wpaz33.hot.corp.google.com (wpaz33.hot.corp.google.com [172.24.198.97]) by smtp-out.google.com with ESMTP id n3N71Svl022328 for ; Thu, 23 Apr 2009 08:01:28 +0100 Received: from qyk29 (qyk29.prod.google.com [10.241.83.157]) by wpaz33.hot.corp.google.com with ESMTP id n3N711KH022441 for ; Thu, 23 Apr 2009 00:01:26 -0700 Received: by qyk29 with SMTP id 29so819159qyk.15 for ; Thu, 23 Apr 2009 00:01:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.85.1 with SMTP id m1mr284755qcl.56.1240470086505; Thu, 23 Apr 2009 00:01:26 -0700 (PDT) In-Reply-To: References: <1239225742.8871.145.camel@localhost.localdomain> <20090420131751.GA25075@caradoc.them.org> <8ac60eac0904200947y2acca97arc1a0fc61530357a0@mail.gmail.com> <20090420170154.GA10112@caradoc.them.org> <8ac60eac0904201019g7ba8056bx5e84e6bfdf5935d8@mail.gmail.com> <20090420180352.GA14206@caradoc.them.org> <8ac60eac0904201208m95d4585k2b09f6b6fe5edb40@mail.gmail.com> <20090422172517.GA17235@caradoc.them.org> <8ac60eac0904221810x24763ecaj4a888927b766e7f7@mail.gmail.com> Date: Thu, 23 Apr 2009 07:01:00 -0000 Message-ID: <8ac60eac0904230001w1afd9179wcb76e1cfd7f3f386@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/msg00639.txt.bz2 On Wed, Apr 22, 2009 at 11:21 PM, Hui Zhu wrote: > About your patch, I think let user choice load which libthread_db is > very cool idea. > Why not let they set which file they want to load directly? > > For example: > set libthread-db /xxx_dir/libxxx As I stated at the start of this thread, we have a mixture of executables: some are linked statically, some dynamically, and against several (incompatible WRT libthread_db) glibc versions. I'd like GDB to work "automagically" for all such executables, without the end user having to understand and specify exactly which libthread_db must be loaded for each one [1]. The patch allows me to achieve that (all I need to do is provide appropriate local definition of LIBTHREAD_DB_SEARCH_PATH). [1] Understanding this requires the user to understand how GDB uses libthread_db and the relationship between libpthread and libthread_db. Also, the mapping is complicated by the fact that 64-bit GDB is sometimes used to debug 32-bit inferiors. Cheers, -- Paul Pluzhnikov