From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 123572 invoked by alias); 18 Mar 2015 16:53:11 -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 123549 invoked by uid 89); 18 Mar 2015 16:53:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: e06smtp13.uk.ibm.com Received: from e06smtp13.uk.ibm.com (HELO e06smtp13.uk.ibm.com) (195.75.94.109) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 18 Mar 2015 16:53:09 +0000 Received: from /spool/local by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 18 Mar 2015 16:53:06 -0000 Received: from d06dlp03.portsmouth.uk.ibm.com (9.149.20.15) by e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 18 Mar 2015 16:53:03 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 0C9CA1B0804B for ; Wed, 18 Mar 2015 16:53:27 +0000 (GMT) Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t2IGr3u410093018 for ; Wed, 18 Mar 2015 16:53:03 GMT Received: from d06av02.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t2IGqwa1027625 for ; Wed, 18 Mar 2015 10:53:02 -0600 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with SMTP id t2IGqm5i027298; Wed, 18 Mar 2015 10:52:48 -0600 Message-Id: <201503181652.t2IGqm5i027298@d06av02.portsmouth.uk.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Wed, 18 Mar 2015 17:52:48 +0100 Subject: Re: [PATCH 1/2] Fast tracepoint for powerpc64le To: palves@redhat.com (Pedro Alves) Date: Wed, 18 Mar 2015 16:53:00 -0000 From: "Ulrich Weigand" Cc: cole945@gmail.com (Wei-cheng Wang), gdb-patches@sourceware.org In-Reply-To: <5509A2AB.3020004@redhat.com> from "Pedro Alves" at Mar 18, 2015 04:07:07 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15031816-0013-0000-0000-0000035B1F6A X-SW-Source: 2015-03/txt/msg00550.txt.bz2 Pedro Alves wrote: > On 03/18/2015 11:04 AM, Ulrich Weigand wrote: > > gdbserver would access function descriptors only for the > > __nptl_create_event etc. routines. These are looked up > > only after a libthread_db td_ta_new_p call succeeds, which > > should only be true if libpthread has been loaded (and > > relocated) in the inferior. If it hasn't been yet at the > > time gdbserver attaches, the whole thread initialization > > sequence is defered until after the new_objfile event that > > happens after libpthread *was* loaded and relocated. > > Am I missing something here? > > You're missing the case of statically linked threaded > programs. AFAICS, on x86-64, libthread_db.so is loaded > successfully on initial connection, and if I hack gdbserver > to use __nptl_create_event events, I see it setting the > breakpoint already on initial connection. Hmm, I would have thought that in a statically linked executable, function descriptors would need no relocation. However, I guess that isn't true when using PIE ... Bye, Ulrich -- Dr. Ulrich Weigand GNU/Linux compilers and toolchain Ulrich.Weigand@de.ibm.com