This is the mail archive of the gdb-patches@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: [patch][rfc] Allow GDB to search for the right libthread_db.so.1


On Thu, Apr 23, 2009 at 4:32 AM, Hui Zhu <teawater@gmail.com> wrote:
> In function thread_db_load, I suggest try_thread_db_load with
> libthread_db_search_path first.
> Cause I think if user set a directory, he must want it be loaded.

Hui made two suggestions:

1. If libthread_db_search_path is set, use it *before* trying to load
   libthread_db from the same directory where libpthread was loaded in the
   inferior.

2. Allow libthread_db_search_path contain files as well as directories.

Both are (IMHO) reasonable, though I don't particularly like either.

Implementing 1) will cause a bit of searching, because most of the time
the libthread_db which "parallels" libpthread is the right one (at least
for us), and the search is really there mostly for static executables
(which are somewhat rare here).

Implementing 2) "clouds" the meaning of libthread_db_search_path somewhat,
and it is quite unlikely (though certainlyh possible) that libthread_db
will be called anything other than libthread_db.so.1 on Linux.

Comments?

Thanks,
-- 
Paul Pluzhnikov


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