[8/9,gdb/testsuite] Fix gdb.base/jit-reader-exec.exp for remote target
Commit Message
With test-case gdb.base/jit-reader-exec.exp and target board
remote-gdbserver-on-localhost (using REMOTE_TARGET_USERNAME) we run into some
failures.
Fix this by adding the missing gdb_remote_download.
Tested on x86_64-linux.
Co-Authored-by: Ivan Tetyushkin <ivan.tetyushkin@syntacore.com>
---
gdb/testsuite/gdb.base/jit-reader-exec.exp | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
@@ -27,15 +27,19 @@ set testfile2 "jit-reader-execd"
set srcfile2 ${testfile2}.c
set binfile2 [standard_output_file ${testfile2}]
-set compile_options [list debug additional_flags=-DPROGRAM=\"$binfile2\"]
-
-if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
- executable $compile_options] != ""} {
+if {[gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" \
+ executable {debug}] != ""} {
untested "failed to compile"
return -1
}
-if {[gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" \
+if { [is_remote target] } {
+ set binfile2 [gdb_remote_download target $binfile2]
+}
+
+set compile_options [list debug additional_flags=-DPROGRAM=\"$binfile2\"]
+
+if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable $compile_options] != ""} {
untested "failed to compile"
return -1