bug-gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

pthreads with gdb


From: Ranjan Parthasarathy
Subject: pthreads with gdb
Date: Tue, 28 Aug 2001 16:55:03 -0700

I am working on a gdbserver supporting pthreads. I am facing the following 
problem:

I use thread_db as a manager library on top of gdbserver  and setup trap 
points at the start of the __linuxthreads_create_event in libpthread to find 
out when threads are created but for some reason that code is never being 
executed. I have tried other functions like __pthreads_initialize_manager to 
make sure that it is not a problem with my code and I can successfully 
generate a trap in other cases.

I looked at the pthreads sources and looks like there is a flag that pthreads 
uses to skip / enable event reporting for debugging. From the sources it 
looks like the default is not to report events in which case the call to 
__linuxthreads_create_event will not be made unless an external source like 
gdb enables it.

Where does gdb enable / set the flag. The p_report_event is part of the 
_pthreads_descr_struct and whenever new threads are created, the flag for the 
new thread gets copied from the creating thread.

Any help would be useful

Thanks

Ranjan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]