From: Daniel Jacobowitz <drow@false.org>
To: Robert Bu <robert.bu@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: How to set the path of shared library in Linux
Date: Wed, 27 Feb 2008 03:16:00 -0000 [thread overview]
Message-ID: <20080227022922.GA10538@caradoc.them.org> (raw)
In-Reply-To: <a0319f700802261822p5b04e6f6w548ee64dc9c537e9@mail.gmail.com>
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
next prev parent reply other threads:[~2008-02-27 2:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-27 2:29 Robert Bu
2008-02-27 3:16 ` Daniel Jacobowitz [this message]
2008-02-27 3:24 Robert Bu
2008-02-27 5:49 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080227022922.GA10538@caradoc.them.org \
--to=drow@false.org \
--cc=gdb@sourceware.org \
--cc=robert.bu@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox