List Info

Thread: How to set the path of shared library in Linux




How to set the path of shared library in Linux
user name
2008-02-26 20:22:13
Hello,

How can I set the search path of the shared libraries in
Linux for GDB?
I tried "set solib-search-path
path_to_my_shared_lib", but GDB still
tries the $LD_LIBRARY_PATH first. I have two versions of the
same shared
library, one is in $LD_LIBRARY_PATH, the other is in
path_to_my_shared_libray ( not in $LD_LIBRARY_PATH). GDB
just always
uses the one in $LD_LIBRARY_PATH.

Re: How to set the path of shared library in Linux
country flaguser name
United States
2008-02-26 20:29:22
On Wed, Feb 27, 2008 at 10:22:13AM +0800, Robert Bu wrote:
> Hello,
> 
> How can I set the search path of the shared libraries
in Linux for GDB?
> I tried "set solib-search-path
path_to_my_shared_lib", but GDB still
> tries the $LD_LIBRARY_PATH first. I have two versions
of the same shared
> library, one is in $LD_LIBRARY_PATH, the other is in
> path_to_my_shared_libray ( not in $LD_LIBRARY_PATH).
GDB just always
> uses the one in $LD_LIBRARY_PATH.

I'm assuming you are doing local, native debugging (that is,
"run").

GDB should load symbols for whichever one your program is
actually
using.  A common problem is that GDB uses a shell to start
your
program; check that it isn't changing the search paths.  If
GDB
is not loading the same one the program is using, please
show us a
complete transcript of the debug session.

-- 
Daniel Jacobowitz
CodeSourcery

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )