This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: breaks at thread create and delete fail on PPC64/Linux


> Date: Mon, 28 Aug 2006 19:22:06 -0400
> From: Daniel Jacobowitz <drow@false.org>
> 
> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]