Patchwork remote-stdio-gdbserver: Pass "target" to remote_exec to delete file

login
register
mail settings
Submitter Simon Marchi
Date March 6, 2018, 3:54 p.m.
Message ID <1520351651-8210-1-git-send-email-simon.marchi@ericsson.com>
Download mbox | patch
Permalink /patch/26214/
State New
Headers show

Comments

Simon Marchi - March 6, 2018, 3:54 p.m.
As described here

  https://sourceware.org/bugzilla/show_bug.cgi?id=22841

there seems to be situations where the remote-stdio-gdbserver board
fails to delete the uploaded binary file.  Passing "target" fixes the
issue for Christian who reported the bug.

I did not experience this problem, but passing "target" to remote_exec
still works for me, so I'm fine with changing it.

Any objection?

gdb/testsuite/ChangeLog:

	* boards/remote-stdio-gdbserver.exp (${board}_file): Pass
	"target" to remote_exec.
---
 gdb/testsuite/boards/remote-stdio-gdbserver.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Simon Marchi - March 8, 2018, 10:56 p.m.
On 2018-03-06 10:54, Simon Marchi wrote:
> As described here
> 
>   https://sourceware.org/bugzilla/show_bug.cgi?id=22841
> 
> there seems to be situations where the remote-stdio-gdbserver board
> fails to delete the uploaded binary file.  Passing "target" fixes the
> issue for Christian who reported the bug.
> 
> I did not experience this problem, but passing "target" to remote_exec
> still works for me, so I'm fine with changing it.
> 
> Any objection?


I pushed this patch along with

https://sourceware.org/ml/gdb-patches/2018-03/msg00021.html

since it's in the same boat.

Simon

Patch

diff --git a/gdb/testsuite/boards/remote-stdio-gdbserver.exp b/gdb/testsuite/boards/remote-stdio-gdbserver.exp
index aff7902..d559b85 100644
--- a/gdb/testsuite/boards/remote-stdio-gdbserver.exp
+++ b/gdb/testsuite/boards/remote-stdio-gdbserver.exp
@@ -75,7 +75,7 @@  proc get_target_remote_pipe_cmd { } {
 
 proc ${board}_file { dest op args } {
     if { $op == "delete" } {
-	return [remote_exec [get_remote_login] "rm -f $args"]
+	return [remote_exec target "rm -f $args"]
     }
     return [eval [list standard_file $dest $op] $args]
 }