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: Joel Brobecker <brobecker at adacore dot com>
- To: Hui Zhu <teawater at gmail 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 20:38:35 -0700
- Subject: Re: [patch][rfc] Allow GDB to search for the right libthread_db.so.1
- References: <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> <daef60380905031706q5f8f2bads406095be0fa49dc1@mail.gmail.com> <8ac60eac0905032031i401dbe2eke5608b67d13d8732@mail.gmail.com> <daef60380905041954v17e2d4cfsc26fff86cacc7d72@mail.gmail.com>
> Actually, I think libthread_db_search_path is cool function, not
> because it can't be substituted, but because it can make gdb more
> powerful.
> But if after we have this function, we still need:
> > 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.
> I don't think it is very well.
>
> Sorry for my words is directly.
The problem is that you don't necessarily have root priviledges
to do the move that you describe. You might also want to *not*
disturb the rest of the system by moving out the thread_db lib
on the host just to put the one that was used on the target.
On the other hand, my understanding is that it's unlikely that
this library will have a different name; so the feature of being
able to specify the name in the search path is only hypothetical.
And even if it happens, it's easy to create a symbolic link in
an area that you have write access to (say, your home directory),
and then point the search path to link.
That's why we're suggesting that it's not worth allowing files
in the path.
--
Joel