From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11610 invoked by alias); 6 Oct 2011 20:08:29 -0000 Received: (qmail 11600 invoked by uid 22791); 6 Oct 2011 20:08:28 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RP_MATCHES_RCVD,SPF_HELO_PASS,TW_BJ X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 06 Oct 2011 20:08:12 +0000 Received: from hpaq7.eem.corp.google.com (hpaq7.eem.corp.google.com [172.25.149.7]) by smtp-out.google.com with ESMTP id p96K8AT2014432 for ; Thu, 6 Oct 2011 13:08:11 -0700 Received: from qadb15 (qadb15.prod.google.com [10.224.32.79]) by hpaq7.eem.corp.google.com with ESMTP id p96K88D2030741 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Thu, 6 Oct 2011 13:08:09 -0700 Received: by qadb15 with SMTP id b15so5212760qad.1 for ; Thu, 06 Oct 2011 13:08:08 -0700 (PDT) Received: by 10.224.217.134 with SMTP id hm6mr849901qab.261.1317931688502; Thu, 06 Oct 2011 13:08:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.217.134 with SMTP id hm6mr849892qab.261.1317931688274; Thu, 06 Oct 2011 13:08:08 -0700 (PDT) Received: by 10.224.80.149 with HTTP; Thu, 6 Oct 2011 13:08:08 -0700 (PDT) In-Reply-To: <201110062056.25790.pedro@codesourcery.com> References: <20111005182705.D744E2461D1@ruffy.mtv.corp.google.com> <201110061222.24627.pedro@codesourcery.com> <201110062056.25790.pedro@codesourcery.com> Date: Thu, 06 Oct 2011 20:08:00 -0000 Message-ID: Subject: Re: [RFA] Only try to load libthread_db when we load libpthread. From: Doug Evans To: Pedro Alves Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 2011-10/txt/msg00179.txt.bz2 On Thu, Oct 6, 2011 at 12:56 PM, Pedro Alves wrote: > > On Thursday 06 October 2011 12:22:24, Pedro Alves wrote: > > On Wednesday 05 October 2011 19:27:05, Doug Evans wrote: > > > 2011-10-05 =A0Doug Evans =A0 > > > > > > =A0 =A0 =A0 =A0 * linux-thread-db.c (thread_db_new_objfile): Only try= to load > > > =A0 =A0 =A0 =A0 libthread_db when we load libpthread. > > > > Makes sense to me. > > > > > No regressions in amd64-linux, > > > but I can imagine it misses some cases. > > > > Yeah. =A0I think we'll no longer activate thread_db when debugging core > > files of static executables (e.g., a core of gdb.threads/staticthreads). > > It works with live debugging since we call check_for_thread_db > > from linux_child_post_attach/linux_child_post_startup_inferior. > > Maybe moving that to an inferior_created observer in > > linux-thread-db.c would work. > > And all the talk about executables made me realize something else. =A0:-) > > For static threaded executables, we'll want to check for thread > db when the symbols of the main executable are (re)loaded too. > I don't recall off hand if there's a flag in the objfile to > know that it's from the main executable though. In what scenario? [what would the user type?]