This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
gdb and binutils branch master updated. 2d1baf521e08bc390d604aaf1326347cc130ce1f
- From: palves at sourceware dot org
- To: gdb-cvs at sourceware dot org
- Date: 15 Apr 2014 12:37:51 -0000
- Subject: gdb and binutils branch master updated. 2d1baf521e08bc390d604aaf1326347cc130ce1f
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gdb and binutils".
The branch, master has been updated
via 2d1baf521e08bc390d604aaf1326347cc130ce1f (commit)
from 7dd6df0171796757f404a549c76f0d9b9192c849 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2d1baf521e08bc390d604aaf1326347cc130ce1f
commit 2d1baf521e08bc390d604aaf1326347cc130ce1f
Author: Pedro Alves <palves@redhat.com>
Date: Mon Apr 14 17:23:55 2014 +0100
Make sym-file.exp work with remote targets and hosts.
The main issue here is that this test passes the host's absolute path
to the library to load to the "dlopen"-like routine, which doesn't
work when either the target or the host are remote, unless a shared
filesystem has been set up.
Tests that dynamically load a library solve this by dlopen'ing by
basename, and setting rpath to $ORIGIN. See gdb_compile.
This test doesn't use dlopen, but instead uses its own simple elf
loader. The fix is to pass this loader the library basename, and
teach it to look up the library by basename in the executable's
directory as well, i.e., assuming/emulating RPATH=$ORIGIN.
Tested on x86_64 Fedora 17, native and gdbserver.
I looked around in the web to figure out Linux's /proc/self/exe
equivalents in other ELF OSs. I think I covered all relevant, but if
not, I think it'll be simple enough to add more. (Note the test is
skipped on non-ELF targets.)
Tested on x86_64 Fedora 17, native and gdbserver.
gdb/testsuite/
2014-04-15 Pedro Alves <palves@redhat.com>
* gdb.base/sym-file-loader.c: Include <limits.h>.
(SELF_LINK): New define.
(get_origin): New function.
(load_shlib): Use it.
* gdb.base/sym-file.exp: Don't early return if the target is
remote. Use runto_main, and issue fail is that fails. Use
gdb_load_shlibs.
(shlib_name): Delete.
(lib_so, lib_syms, lib_dlopen): New globals. Use them throughout.
-----------------------------------------------------------------------
Summary of changes:
gdb/testsuite/ChangeLog | 12 +++++
gdb/testsuite/gdb.base/sym-file-loader.c | 70 ++++++++++++++++++++++++++++-
gdb/testsuite/gdb.base/sym-file.exp | 50 +++++++++++----------
3 files changed, 106 insertions(+), 26 deletions(-)
hooks/post-receive
--
gdb and binutils