From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2092 invoked by alias); 25 Aug 2015 18:01:06 -0000 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 Received: (qmail 1987 invoked by uid 89); 25 Aug 2015 18:01:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.9 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 25 Aug 2015 18:01:05 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 1D1B98CF7B; Tue, 25 Aug 2015 18:01:04 +0000 (UTC) Received: from host1.jankratochvil.net (ovpn-116-22.ams2.redhat.com [10.36.116.22]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t7PI10Z6000922 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 25 Aug 2015 14:01:03 -0400 Date: Tue, 25 Aug 2015 18:01:00 -0000 From: Jan Kratochvil To: Paul Pluzhnikov Cc: gdb-patches@sourceware.org Subject: Re: [patch][rfc] Allow GDB to search for the right libthread_db.so.1 Message-ID: <20150825180100.GA30888@host1.jankratochvil.net> References: <20090406203920.CCD6F19C4EC@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090406203920.CCD6F19C4EC@localhost> User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2015-08/txt/msg00730.txt.bz2 On Mon, 06 Apr 2009 22:39:20 +0200, Paul Pluzhnikov wrote: > We have perhaps uncommon setup here, where we have several installed > versions of glibc, and need to debug executables which are compiled > and linked against them (using -rpath). > > Currently, GDB will dlopen("libthread_db.so.1", ...), which means that > in order debug "non-standard" binary, one has to set LD_LIBRARY_PATH to > point to correct libthread_db before invoking GDB, or it will refuse to > see threads in the inferior. This is not automatic, and error prone. Just out of curiosity: libthread_db should be compatible with any libpthread thanks to: $ nm /lib64/libpthread.so.0|grep _thread_db_ 0000003d1b812010 r _thread_db_dtv_dtv 0000003d1b812004 r _thread_db_dtv_t_pointer_val 0000003d1b81201c r _thread_db_link_map_l_tls_modid 0000003d1b8120c4 r _thread_db_list_t_next 0000003d1b8120b8 r _thread_db_list_t_prev [39 lines total] Do you use non-glibc libthread_db/libpthread (Bionic?) or this _thread_db_* compatibility API does not work even for glibc versions? Thanks, Jan