This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/15079] New: GDB loads local symbol file if it cannot find amatching file in sysroot/solib-search-path (both set).
- From: "sanimir.agovic at intel dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Tue, 29 Jan 2013 14:22:32 +0000
- Subject: [Bug gdb/15079] New: GDB loads local symbol file if it cannot find amatching file in sysroot/solib-search-path (both set).
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=15079
Bug #: 15079
Summary: GDB loads local symbol file if it cannot find a
matching file in sysroot/solib-search-path (both set).
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: gdb
AssignedTo: unassigned@sourceware.org
ReportedBy: sanimir.agovic@intel.com
Classification: Unclassified
Setting sysroot[1] allows one to use an alternative system root for the program
being debugged. Using it in combination with solib-search-path unfortunately
leak in the local / system root if no matching library was found in the search
path. In a cross debugging scenario this yield the following warning as GDB
load the host libraries instead of the target ones:
warning: `/usr/lib/libfoobar.so': Shared library architecture FOO is not
compatible with target architecture BAR.
[1]
http://sourceware.org/gdb/current/onlinedocs/gdb/Files.html#index-set-sysroot-1077
Set sysroot
-----------
$ gdb -q -ex "set sysroot /foo/bar" -ex "file /bin/true" -ex run
Reading symbols from /bin/true...(no debugging symbols found)...done.
Starting program: /bin/true
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
GDB could not find any matching solibs in the set sysroot, which is expected at
least to me.
Set sysroot and solib-search-path
---------------------------------
$ gdb -q -ex "set sysroot /foo/bar" -ex "set solib-search-path /foo/bar" -ex
"file /bin/true" -ex run
Reading symbols from /bin/true...(no debugging symbols found)...done.
Starting program: /bin/true
In this case GDB resolved the solibs via the / system root and thus break the
sysroot jail.
--
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.