From 32e0d36918d0acaafba8940327a2ba12c96ac534 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Tue, 15 Nov 2022 15:24:54 +0100 Subject: [PATCH] [gdb/testsuite] Fix gdb.base/jit-reader-exec.exp for remote target 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 --- gdb/testsuite/gdb.base/jit-reader-exec.exp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/gdb/testsuite/gdb.base/jit-reader-exec.exp b/gdb/testsuite/gdb.base/jit-reader-exec.exp index c5ee8ef89a3..ad47c5a9610 100644 --- a/gdb/testsuite/gdb.base/jit-reader-exec.exp +++ b/gdb/testsuite/gdb.base/jit-reader-exec.exp @@ -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 -- 2.30.2