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: (linux/threads) Interesting side-effect of "auto-solib-add 0"


On Tue, Sep 12, 2006 at 05:27:13PM -0700, Joel Brobecker wrote:
> It seems to me that we should be able to fix this by adding an observer
> of the `solib_loaded' event to replace the hook that linux-thread-db
> installed. I actually gave it a try, using the sources from CVS, and
> found out something surprising: Although the solib_loaded observer
> I just created gets called as expected, the linux thread layers does
> not detect that threads are in use:

You've missed the pertinent fact here.  We're not waiting for
libpthread.so to be loaded just for kicks!  The only way libthread_db
can operate is by querying back through GDB for the locations of
symbols in the thread library.  If we don't load that objfile, then
it can't initialize.

> The only difference I can see between the two runs is that symbols
> are read in one case, and not read in the other case. Is libthread_db.so
> dependent on having the symbol table being loaded or something of that
> sort?

Yes.  Don't load libpthread, won't get threads.

-- 
Daniel Jacobowitz
CodeSourcery


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