[rfa/threads] Convert thread event descriptors to code addrs

Daniel Jacobowitz drow@mvista.com
Mon Dec 1 16:01:00 GMT 2003

On Wed, Nov 26, 2003 at 12:28:38PM -0500, Andrew Cagney wrote:
> >On Tue, Nov 25, 2003 at 06:39:42PM -0500, Andrew Cagney wrote:
> >
> >>In the light of roland's comments, I've checked in the attached 
> >>variation on the original patch.
> >>
> >>It still does the conversion but in GDB's libthread_db caller 
> >>(enable_thread_event_reporting) and not in libthread_db's symbol lookup 
> >>callee (ps_pglobal_lookup).
> >>
> >>This way, libthread_db is free to search for either:
> >>.__nptl_create_event: the start address
> >>__nptl_create_event: the descriptor
> >>(the original change would have restricted searches to just the start 
> >>address - not a problem now but we never know) and at the same time 
> >>ensure that GDB sets breakpoints at the address it needs.
> >>
> >>Andrew
> >
> >
> >>2003-11-25  Andrew Cagney  <cagney@redhat.com>
> >>
> >>	* thread-db.c (enable_thread_event): New function.  Ensure that BP
> >>	is a code address.
> >>	(enable_thread_event_reporting): Use enable_thread_event.
> >
> >
> >Hmm.  Does this mean remote_lookup_symbol (spelling?) should do the
> >same thing?
> (remote_check_symbols?)  Wouldn't that be equivalent to my original 
> patch (wrong side of libthread_db)?  I suspect you want to add something 
> to gdbserver (or just wait for Roland's updated libthread_db).

Any remote client asking for a function address is going to want to put
a breakpoint there, I would have guessed.  Thus we should return the
breakpointable address.

Hum, maybe there is some use in having the descriptor... let me think
about it.  This should go into the remote protocol doco one way or the

Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

More information about the Gdb-patches mailing list