public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/15079] New: GDB loads local symbol file if it cannot find a matching file in sysroot/solib-search-path (both set).
@ 2013-01-29 14:22 sanimir.agovic at intel dot com
  2013-02-05 13:22 ` [Bug gdb/15079] " palves at redhat dot com
  2013-02-19 10:23 ` sanimir.agovic at intel dot com
  0 siblings, 2 replies; 3+ messages in thread
From: sanimir.agovic at intel dot com @ 2013-01-29 14:22 UTC (permalink / raw)
  To: gdb-prs

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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug gdb/15079] GDB loads local symbol file if it cannot find a matching file in sysroot/solib-search-path (both set).
  2013-01-29 14:22 [Bug gdb/15079] New: GDB loads local symbol file if it cannot find a matching file in sysroot/solib-search-path (both set) sanimir.agovic at intel dot com
@ 2013-02-05 13:22 ` palves at redhat dot com
  2013-02-19 10:23 ` sanimir.agovic at intel dot com
  1 sibling, 0 replies; 3+ messages in thread
From: palves at redhat dot com @ 2013-02-05 13:22 UTC (permalink / raw)
  To: gdb-prs

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

Pedro Alves <palves at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING
                 CC|                            |palves at redhat dot com

--- Comment #1 from Pedro Alves <palves at redhat dot com> 2013-02-05 13:22:00 UTC ---
Hmm, sounds about the same as:

http://sourceware.org/ml/gdb-patches/2012-09/msg00665.html

Do you have that patch? What's your GDB version?

-- 
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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug gdb/15079] GDB loads local symbol file if it cannot find a matching file in sysroot/solib-search-path (both set).
  2013-01-29 14:22 [Bug gdb/15079] New: GDB loads local symbol file if it cannot find a matching file in sysroot/solib-search-path (both set) sanimir.agovic at intel dot com
  2013-02-05 13:22 ` [Bug gdb/15079] " palves at redhat dot com
@ 2013-02-19 10:23 ` sanimir.agovic at intel dot com
  1 sibling, 0 replies; 3+ messages in thread
From: sanimir.agovic at intel dot com @ 2013-02-19 10:23 UTC (permalink / raw)
  To: gdb-prs

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

sagovic <sanimir.agovic at intel dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
            Version|HEAD                        |archer
         Resolution|                            |WORKSFORME

--- Comment #2 from sagovic <sanimir.agovic at intel dot com> 2013-02-19 10:23:08 UTC ---
I`m using archer-fc18. After applying the patch or moving to fsf-head it works.

Thanks.

-- 
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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-02-19 10:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-29 14:22 [Bug gdb/15079] New: GDB loads local symbol file if it cannot find a matching file in sysroot/solib-search-path (both set) sanimir.agovic at intel dot com
2013-02-05 13:22 ` [Bug gdb/15079] " palves at redhat dot com
2013-02-19 10:23 ` sanimir.agovic at intel dot com

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).