public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] [gdb/testsuite] Fix gdb.base/jit-reader-exec.exp for remote target
@ 2022-11-15 14:25 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2022-11-15 14:25 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=32e0d36918d0acaafba8940327a2ba12c96ac534

commit 32e0d36918d0acaafba8940327a2ba12c96ac534
Author: Tom de Vries <tdevries@suse.de>
Date:   Tue Nov 15 15:24:54 2022 +0100

    [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 <ivan.tetyushkin@syntacore.com>

Diff:
---
 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-11-15 14:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-15 14:25 [binutils-gdb] [gdb/testsuite] Fix gdb.base/jit-reader-exec.exp for remote target Tom de Vries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).