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
- From: Hui Zhu <teawater at gmail dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: Paul Pluzhnikov <ppluzhnikov at google dot com>, tromey at redhat dot com, Thiago Jung Bauermann <bauerman at br dot ibm dot com>, gdb-patches ml <gdb-patches at sourceware dot org>, Eli Zaretskii <eliz at gnu dot org>
- Date: Mon, 4 May 2009 08:06:47 +0800
- Subject: Re: [patch][rfc] Allow GDB to search for the right libthread_db.so.1
- References: <8ac60eac0904201019g7ba8056bx5e84e6bfdf5935d8@mail.gmail.com> <8ac60eac0904201208m95d4585k2b09f6b6fe5edb40@mail.gmail.com> <20090422172517.GA17235@caradoc.them.org> <8ac60eac0904221810x24763ecaj4a888927b766e7f7@mail.gmail.com> <daef60380904222321h33fe2fe1n7dd0f6e94e804d8c@mail.gmail.com> <8ac60eac0904230001w1afd9179wcb76e1cfd7f3f386@mail.gmail.com> <daef60380904230105u20843291pe8ee9f98e5ed1d76@mail.gmail.com> <daef60380904230432l7f49d44dw17437e208b35cb9f@mail.gmail.com> <8ac60eac0904291330m78b43c47p1cc9b8379e31e923@mail.gmail.com> <20090430185551.GB10734@adacore.com>
On Fri, May 1, 2009 at 02:55, Joel Brobecker <brobecker@adacore.com> wrote:
> Just my 2 cents, from an outsider's point of view:
>
>> 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.
>
> From my naive perspective (never really had a need for this feature),
> it seems better to check the path before checking the path that was
> used by the inferior. ?Otherwise, if the local host has a library
> at the same location but that's different from the library used
> by the inferior, we wouldn't be able to force the debugger to use
> a different library, would we?
>
>> 2. Allow libthread_db_search_path contain files as well as directories.
> [...]
>> 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.
>
> This one seems much less important, if at all, to me, especially if
> it is unlikely that libthread_db might have a different name. And
> even in this case, it's easy to create a symbolic link in a user
> area, and update the path to point to that directory.
If we can let user create a slink here, User can create slink to
right lib with themselves. Maybe they don't need set
libthread_db_search_path then.