From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7190 invoked by alias); 29 Aug 2006 19:04:12 -0000 Received: (qmail 7182 invoked by uid 22791); 29 Aug 2006 19:04:11 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 29 Aug 2006 19:04:08 +0000 Received: from elgar.sibelius.xs4all.nl (root@elgar.sibelius.xs4all.nl [192.168.0.2]) by sibelius.xs4all.nl (8.13.4/8.13.4) with ESMTP id k7TJ3Vva019856; Tue, 29 Aug 2006 21:03:31 +0200 (CEST) Received: from elgar.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.13.6/8.13.6) with ESMTP id k7TJ3VHb031644; Tue, 29 Aug 2006 21:03:31 +0200 (CEST) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.13.8/8.13.8/Submit) id k7TJ3VPb001854; Tue, 29 Aug 2006 21:03:31 +0200 (CEST) Date: Tue, 29 Aug 2006 19:04:00 -0000 Message-Id: <200608291903.k7TJ3VPb001854@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: drow@false.org CC: pgilliam@us.ibm.com, gdb@sources.redhat.com, sjmunroe@us.ibm.com In-reply-to: <20060828232206.GA27059@nevyn.them.org> (message from Daniel Jacobowitz on Mon, 28 Aug 2006 19:22:06 -0400) Subject: Re: breaks at thread create and delete fail on PPC64/Linux References: <1156806903.5898.29.camel@dufur.beaverton.ibm.com> <20060828232206.GA27059@nevyn.them.org> Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-08/txt/msg00220.txt.bz2 > Date: Mon, 28 Aug 2006 19:22:06 -0400 > From: Daniel Jacobowitz > > On Mon, Aug 28, 2006 at 04:15:03PM -0700, PAUL GILLIAM wrote: > > 3) 'dereferencing' the function descriptor should give the > > actual address at which to set a breakpoint, but gives instead > > the offset within the "pthread" library where the breakpoint > > should be placed. > > > > The attached patch 'fixes' the problem by looking up the load > > address of the "pthread" library and adding that to the address > > from the PLT. This seems to do the trick, but THIS HAS ONLY BEEN > > TESTED WITH A 64-BIT GDB AND A 64-BIT TARGET. And it's a real > > HACK!!! > > > > But it does illustrate the problem. > > > > So, should I try to change GDB so that enable_thread_event() gets > > called after the dynamic loader has has a chance to relocate the > > .opd? > > Here's my question: why isn't that happening already? Don't we get > shared library events after relocation processing? Or do we get one > before and one after? Normally we get an event right before a shared library and its dependencies is loaded and right after. At that last event things are supposed to be in a consistent state, so relocations should have been processed (except for relocations to be resilved by lazy binding of course). Mark