[4/7,gdb/testsuite] fix test gdb.base/solib-vanish.exp for remote execution
Commit Message
---
gdb/testsuite/gdb.base/solib-vanish.exp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
@@ -67,6 +67,7 @@ set lib2_flags {debug}
set lib1name "solib-vanish-lib1"
set srcfile_lib1 ${srcdir}/${subdir}/${lib1name}.c
set binfile_lib1 [standard_output_file ${lib1name}.so]
+set runtimebinfile_lib1 [get_runtime_file $binfile_lib1]
set lib1_flags [list debug shlib=${binfile_lib2}]
# Main program
@@ -74,7 +75,7 @@ set testfile "solib-vanish-main"
set srcfile ${srcdir}/${subdir}/${testfile}.c
set executable ${testfile}
set binfile [standard_output_file ${executable}]
-set bin_flags [list debug shlib_load additional_flags=-DVANISH_LIB=\"${binfile_lib1}\"]
+set bin_flags [list debug shlib_load additional_flags=-DVANISH_LIB=\"${runtimebinfile_lib1}\"]
if { [gdb_compile_shlib ${srcfile_lib2} ${binfile_lib2} $lib2_flags] != ""
|| [gdb_compile_shlib ${srcfile_lib1} ${binfile_lib1} $lib1_flags] != ""
@@ -85,6 +86,10 @@ if { [gdb_compile_shlib ${srcfile_lib2} ${binfile_lib2} $lib2_flags] != ""
clean_restart $testfile
+# load shlib to target
+gdb_load_shlib $binfile_lib1
+gdb_load_shlib $binfile_lib2
+
if { ![runto_main] } {
return
}