diff options
author | Pedro Alves <palves@redhat.com> | 2017-10-13 10:26:06 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2017-10-13 10:29:30 +0100 |
commit | 27c9e813f93974c2d1e237f3c4f25029627bcb58 (patch) | |
tree | f9fe09632c0c376d21edb0fac97f88355badb917 /gdb | |
parent | 5e830d9807b91f806524ff822d953443c8fb3d2f (diff) | |
download | fsf-binutils-gdb-27c9e813f93974c2d1e237f3c4f25029627bcb58.zip fsf-binutils-gdb-27c9e813f93974c2d1e237f3c4f25029627bcb58.tar.gz fsf-binutils-gdb-27c9e813f93974c2d1e237f3c4f25029627bcb58.tar.bz2 |
Make gdb.base/solib-nodir.exp work with --target_board=native-extended-gdbserver
Fixes:
Running .../src/gdb/testsuite/gdb.base/solib-nodir.exp ...
FAIL: gdb.base/solib-nodir.exp: library loaded
... by using the new "set cwd" command.
gdb/testsuite/ChangeLog:
2017-10-13 Pedro Alves <palves@redhat.com>
Simon Marchi <simon.marchi@polymtl.ca>
* gdb.base/solib-nodir.exp: Split is_remote and skip_shlib_tests
calls and add comments. Skip test if use_gdb_stub is set.
(top level): Use "set cwd" command instead of "cd" command.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/solib-nodir.exp | 18 |
2 files changed, 22 insertions, 3 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 9aac613..b37da2a 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,4 +1,11 @@ 2017-10-13 Pedro Alves <palves@redhat.com> + Simon Marchi <simon.marchi@polymtl.ca> + + * gdb.base/solib-nodir.exp: Split is_remote and skip_shlib_tests + calls and add comments. Skip test if use_gdb_stub is set. + (top level): Use "set cwd" command instead of "cd" command. + +2017-10-13 Pedro Alves <palves@redhat.com> * gdb.base/shlib-call.exp (top level): Use gdb_run_cmd and remove is_remote target check. diff --git a/gdb/testsuite/gdb.base/solib-nodir.exp b/gdb/testsuite/gdb.base/solib-nodir.exp index 9cb682e..15673d1 100644 --- a/gdb/testsuite/gdb.base/solib-nodir.exp +++ b/gdb/testsuite/gdb.base/solib-nodir.exp @@ -13,8 +13,19 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. */ -# are we on a target board -if {[is_remote target] || [skip_shlib_tests]} { +if [skip_shlib_tests] { + return +} + +# The testcase assumes the target can access the OBJDIR. +if [is_remote target] { + return +} + +# We need to be able to influence the target's environment and working +# directory. Can't do that if when we connect the inferior is already +# running. +if [target_info exists use_gdb_stub] { return } @@ -44,7 +55,8 @@ clean_restart $executable gdb_load_shlib ${binlibfile} gdb_test_no_output "set env LD_LIBRARY_PATH=:" -gdb_test "cd ${binlibfiledir}" "Working directory [string_to_regexp ${binlibfiledir}]\\." "cd OBJDIR/${subdir}" +gdb_test_no_output "set cwd ${binlibfiledir}" \ + "set cwd OBJDIR/${subdir}" set test "library loaded" if [runto_main] { |