[gdb/testsuite] Fix gdb.base/fork-no-detach-follow-child-dlopen.exp for remote target
authorTom de Vries <tdevries@suse.de>
Tue, 7 Mar 2023 14:28:52 +0000 (15:28 +0100)
committerTom de Vries <tdevries@suse.de>
Tue, 7 Mar 2023 14:28:52 +0000 (15:28 +0100)
Fix test-case gdb.base/fork-no-detach-follow-child-dlopen.exp for target board
remote-gdbserver-on-localhost.exp by using gdb_download_shlib and gdb_locate_shlib.

Tested on x86_64-linux.

gdb/testsuite/gdb.base/fork-no-detach-follow-child-dlopen.exp

index 6bc734ebf0f52ef30026af0c39f2579b503d2c8e..94111fe3bebdedf52f221c24d287018a844cca6d 100644 (file)
@@ -32,14 +32,16 @@ if { [gdb_compile_shlib $srcdir/$subdir/$srcfile2 $shlib_path {debug}] != "" } {
     return
 }
 
-set opts [list shlib_load additional_flags=-DSHLIB_PATH="${shlib_path}"]
+set shlib_path_target [gdb_download_shlib $::shlib_path]
+
+set opts [list shlib_load additional_flags=-DSHLIB_PATH="${shlib_path_target}"]
 if { [build_executable "failed to prepare" ${testfile} ${srcfile} $opts] } {
     return
 }
 
 proc do_test {} {
     clean_restart $::binfile
-    gdb_load_shlib $::shlib_path
+    gdb_locate_shlib $::shlib_path
     gdb_test_no_output "set follow-fork-mode child"
     gdb_test_no_output "set detach-on-fork off"