public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [obvious, committed] gdb/testsuite: Fix gdb.base/list-missing-source.exp on remote host.
@ 2020-06-21  0:32 Sandra Loosemore
  0 siblings, 0 replies; only message in thread
From: Sandra Loosemore @ 2020-06-21  0:32 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 288 bytes --]

This test case tries to create a source file, compile it, and then 
delete it before starting GDB.  Unfortunately it was doing the file 
creation and deletion operations on build rather than host.  Fixing this 
was straightforward, so I have gone ahead and committed this patch.

-Sandra

[-- Attachment #2: missing-source.patch --]
[-- Type: text/x-patch, Size: 1433 bytes --]

commit 4d91c2a4677b90802c8d369190927921bf8ee97d
Author: Sandra Loosemore <sandra@codesourcery.com>
Date:   Sat Jun 20 17:23:53 2020 -0700

    Fix gdb.base/list-missing-source.exp on remote host.
    
    2020-06-20  Sandra Loosemore  <sandra@codesourcery.com>
    
    	gdb/testsuite/
    	* gdb.base/list-missing-source.exp: Correct $srcfile manipulation
    	for remote host.

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 36662f9..5ae3ffa 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2020-06-20  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* gdb.base/list-missing-source.exp: Correct $srcfile manipulation
+	for remote host.
+
 2020-06-19  Sandra Loosemore  <sandra@codesourcery.com>
 	    Hafiz Abid Qadeer  <abidh@codesourcery.com>
 
diff --git a/gdb/testsuite/gdb.base/list-missing-source.exp b/gdb/testsuite/gdb.base/list-missing-source.exp
index e64f42c..72d3922 100644
--- a/gdb/testsuite/gdb.base/list-missing-source.exp
+++ b/gdb/testsuite/gdb.base/list-missing-source.exp
@@ -29,6 +29,7 @@ main ()
 }
 }
 close $fd
+set srcfile [remote_download host $srcfile]
 
 # Compile the source file.
 set options "debug"
@@ -39,7 +40,7 @@ if  { [gdb_compile "${srcfile}" "${binfile}" \
 }
 
 # Now delete the source file.
-file delete $srcfile
+remote_file host delete $srcfile
 
 # Now start GDB, run to main and try to list the source.
 clean_restart ${binfile}

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

only message in thread, other threads:[~2020-06-21  0:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-21  0:32 [obvious, committed] gdb/testsuite: Fix gdb.base/list-missing-source.exp on remote host Sandra Loosemore

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).