public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "palves at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/13989] gdb invalid search order for shared libraries by cross debuging
Date: Wed, 18 Apr 2012 11:50:00 -0000	[thread overview]
Message-ID: <bug-13989-4717-upayB9XAEG@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-13989-4717@http.sourceware.org/bugzilla/>

http://sourceware.org/bugzilla/show_bug.cgi?id=13989

Pedro Alves <palves at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |palves at redhat dot com

--- Comment #1 from Pedro Alves <palves at redhat dot com> 2012-04-18 11:45:16 UTC ---
I'm guessing this use case wasn't originally considered, because it doesn't
look like how set sysroot/solib-search-path are meant to be used.

(gdb) help set solib-search-path 
Set the search path for loading non-absolute shared library symbol files.
                                ^^^^^^^^^^^^
This takes precedence over the environment variables PATH and LD_LIBRARY_PATH.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This command is there mostly to help targets like Windows that don't report to
the debugger the full path to the shared library.  GNU/Linux always works with
full patchs, such as "/usr/lib/libjpeg.so.8".

The normal use of "set sysroot" is to point that at a directory that contains
_all_ the libraries the target reports as loaded (or simply, the copy of the
target's whole root filesystem).  IOW, make the sysroot wholly self contained
(you can use symlinks though), and forget about solib-search-path.

Or, with GDB >= 7.0, point the sysroot at "remote:", and GDB will fetch the
libraries from the target automatically (but won't work in the end if you strip
the copies of the libraries on the target, as GDB will work with the stripped
copies then).

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


  reply	other threads:[~2012-04-18 11:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-18 11:30 [Bug gdb/13989] New: " Daniel.Lehne@amk-drives.bg
2012-04-18 11:50 ` palves at redhat dot com [this message]
2012-04-18 12:33 ` [Bug gdb/13989] " Daniel.Lehne@amk-drives.bg
2012-04-18 12:58 ` Daniel.Lehne@amk-drives.bg
2012-05-10 14:31 ` palves at redhat dot com
2012-09-28 19:50 ` palves at redhat dot com
2012-09-28 20:20 ` cvs-commit at gcc dot gnu.org
2012-09-28 21:10 ` palves at redhat dot com

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=bug-13989-4717-upayB9XAEG@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).