This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch][rfc] Allow GDB to search for the right libthread_db.so.1
On Mon, Apr 20, 2009 at 10:19:49AM -0700, Paul Pluzhnikov wrote:
> Oh, right.
>
> If the executable selects LinuxThreads via something like
> LD_ASSUME_KERNEL, then GDB must also be invoked with the same, or it
> will bind to the wrong libthread_db. And of course "old" static
> threaded binaries will continue to use LinuxThreads forever :-(
Right. For a long time -static selected LinuxThreads but runtime
generally selected NPTL. Thus the search.
> >> The symbol lookup works for statically linked executables ...
> >
> > I see. ?Do you ship a libthread_db.so alongside a static executable?
>
> Generally we don't ship anything to the outside world (with the
> exception of Google search appliance). For our production environment,
> we already have several versions of libthread_db.so installed in
> known locations, and (with this patch) it's just a matter of iterating
> over possible locations until the right libthread_db is found.
I don't see why you need the symbol list for this; shouldn't we do the
search at the same time we'd previously have pushed libthread_db? We
went through a lot of pain to get the timing right for both dynamic
and static binaries.
--
Daniel Jacobowitz
CodeSourcery