public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] [gdb/testsuite] Fix have_avx for remote target
@ 2023-03-17 15:06 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2023-03-17 15:06 UTC (permalink / raw)
  To: gdb-cvs

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

commit 0eb0e0828783c72144676e6a9884d26d960246f8
Author: Tom de Vries <tdevries@suse.de>
Date:   Fri Mar 17 16:06:39 2023 +0100

    [gdb/testsuite] Fix have_avx for remote target
    
    In proc have_avx we compile some source into an exec, resulting in a file $obj
    on build, and then attempt to execute it on target:
    ...
        set result [remote_exec target $obj]
    ...
    
    Fix this by using gdb_remote_download target.
    
    Likewise in a few other procs that use "remote_exec target".
    
    Tested on x86_64-linux.

Diff:
---
 gdb/testsuite/lib/gdb.exp | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 0e69bcab288..7ceb702b0bf 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -8987,7 +8987,8 @@ gdb_caching_proc supports_scalar_storage_order_attribute {} {
 	return 0
     }
 
-    set result [remote_exec target $obj]
+    set target_obj [gdb_remote_download target $obj]
+    set result [remote_exec target $target_obj]
     set status [lindex $result 0]
     set output [lindex $result 1]
     if { $output != "" } {
@@ -9047,7 +9048,8 @@ gdb_caching_proc have_mpx {} {
         return 0
     }
 
-    set result [remote_exec target $obj]
+    set target_obj [gdb_remote_download target $obj]
+    set result [remote_exec target $target_obj]
     set status [lindex $result 0]
     set output [lindex $result 1]
     if { $output != "" } {
@@ -9071,7 +9073,8 @@ gdb_caching_proc have_mpx {} {
         return 0
     }
 
-    set result [remote_exec target $obj]
+    set target_obj [gdb_remote_download target $obj]
+    set result [remote_exec target $target_obj]
     set status [lindex $result 0]
     set output [lindex $result 1]
     set status [expr ($status == 0) \
@@ -9114,7 +9117,8 @@ gdb_caching_proc have_avx {} {
         return 0
     }
 
-    set result [remote_exec target $obj]
+    set target_obj [gdb_remote_download target $obj]
+    set result [remote_exec target $target_obj]
     set status [lindex $result 0]
     set output [lindex $result 1]
     if { $output != "" } {
@@ -9311,7 +9315,8 @@ gdb_caching_proc arm_cc_for_target {} {
 		 $src \
 		 executable [list compiler=$compiler]]} {
 
-	    set result [remote_exec target $obj]
+	    set target_obj [gdb_remote_download target $obj]
+	    set result [remote_exec target $target_obj]
 	    set status [lindex $result 0]
 	    set output [lindex $result 1]

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

only message in thread, other threads:[~2023-03-17 15:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-17 15:06 [binutils-gdb] [gdb/testsuite] Fix have_avx 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).