2013-08-29 Sterling Augustine <saugustine@google.com>
authorSterling Augustine <saugustine@google.com>
Thu, 29 Aug 2013 19:22:06 +0000 (19:22 +0000)
committerSterling Augustine <saugustine@google.com>
Thu, 29 Aug 2013 19:22:06 +0000 (19:22 +0000)
        * boards/remote-stdio-gdbserver.exp: Set rcp_prog and
        rsh_prog in new conditional.  Move use of REMOTE_PORTNUM into
        said conditional.

gdb/testsuite/ChangeLog
gdb/testsuite/boards/remote-stdio-gdbserver.exp

index 2aefa563ea53c8920f0d93400bdf95099bfac5e0..3b259c7cd4d6217aa9d932fef3688ec75116cd3f 100644 (file)
@@ -1,3 +1,9 @@
+2013-08-29  Sterling Augustine  <saugustine@google.com>
+
+       * boards/remote-stdio-gdbserver.exp: Set rcp_prog and
+       rsh_prog in new conditional.  Move use of REMOTE_PORTNUM into
+       said conditional.
+
 2013-08-29  Phil Muldoon  <pmuldoon@redhat.com>
 
        * gdb.python/py-arch.exp: Load gdb-python.exp.
index 2daa35ff1095a8291d8f8fbca5ad1b135e45454d..df2f555882feb9f8be2a1ba527fbdc3561f9106f 100644 (file)
@@ -26,9 +26,6 @@
 
 load_board_description "native-stdio-gdbserver"
 
-set_board_info rsh_prog /usr/bin/ssh
-set_board_info rcp_prog /usr/bin/scp
-
 # Test machine info. The generic_config gdbserver reads some of these
 # values from board_info, so this file must set them there.
 if [info exists REMOTE_USERNAME] {
@@ -41,8 +38,17 @@ if [info exists REMOTE_HOSTNAME] {
 } else {
     set_board_info hostname unspecified_hostname
 }
+
+# The two programs have different syntax to set the remote port, so
+# set it as part of the program name rather than in get_remote_login.
+
 if [info exists REMOTE_PORTNUM] {
     set_board_info portnum $REMOTE_PORTNUM
+    set_board_info rsh_prog "/usr/bin/ssh -p$REMOTE_PORTNUM"
+    set_board_info rcp_prog "/usr/bin/scp -P$REMOTE_PORTNUM"
+} else {
+    set_board_info rsh_prog /usr/bin/ssh
+    set_board_info rcp_prog /usr/bin/scp
 }
 
 # Some remote machines don't have writable home directories.
@@ -64,9 +70,6 @@ proc get_remote_login { } {
     if {[board_info [target_info name] exists hostname]} {
        append result "[board_info [target_info name] hostname]"
     }
-    if {[board_info [target_info name] exists portnum]} {
-       append result ":[board_info [target_info name] portnum]"
-    }
     return $result
 }