From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 60377 invoked by alias); 25 Aug 2015 18:22:19 -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 60366 invoked by uid 89); 25 Aug 2015 18:22:18 -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:22:18 +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 01A32461D7; Tue, 25 Aug 2015 18:22:16 +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 t7PIMDTF015743 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 25 Aug 2015 14:22:15 -0400 Date: Tue, 25 Aug 2015 18:22:00 -0000 From: Jan Kratochvil To: Paul Pluzhnikov Cc: gdb-patches ml , Pedro Alves Subject: Re: [patch][rfc] Allow GDB to search for the right libthread_db.so.1 Message-ID: <20150825182212.GB9494@host1.jankratochvil.net> References: <20090406203920.CCD6F19C4EC@localhost> <20150825180100.GA30888@host1.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2015-08/txt/msg00733.txt.bz2 On Tue, 25 Aug 2015 20:13:54 +0200, Paul Pluzhnikov wrote: > We've had a lot of systems where installed /lib64/libthread_db was > from glibc-2.7, while target binary was using glibc-2.3.6, and I am > 99.99% sure that combination didn't work. Pedro explained that glibc also does: # $ grep -rn nptl_version nptl* # nptl/ChangeLog.old:7461: * init.c (nptl_version): Add __attribute_used__ to nptl_version. # nptl/nptl-init.c:68:static const char nptl_version[] __attribute_used__ = VERSION; # nptl_db/td_ta_new.c:42: if (td_lookup (ps, SYM_nptl_version, &versaddr) != PS_OK) # nptl_db/structs.def:53:DB_SYMBOL (nptl_version) # # So that alone makes a libthread_db.so for glibc 2.x refuse to work with glibc 2.y. BTW the nptl_version check seems to predate the _thread_db_* symbols. Thanks, Jan