From: Sterling Augustine <saugustine@google.com>
To: gdb-patches <gdb-patches@sourceware.org>
Cc: Doug Evans <dje@google.com>
Subject: Re: [patch] Set remote port numbers correctly in remote-stdio-gdbserver.exp
Date: Thu, 29 Aug 2013 19:03:00 -0000 [thread overview]
Message-ID: <CAEG7qUwVarou0=D=RxwWY5oXHUuf5kAOONV-5R1Uey8ZtnAPKg@mail.gmail.com> (raw)
In-Reply-To: <CAEG7qUy506wJtiaYncj7cAJtOAjDQWQBf-H5rLeZFHJi3xbLpw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 658 bytes --]
On Thu, Aug 29, 2013 at 11:40 AM, Sterling Augustine
<saugustine@google.com> wrote:
> The enclosed fairly straightforward patch to the board file
> remote-stdio-gdbserver.exp fixes the syntax scp and rsh use to select
> the remote port, which was broken before.
>
> Tested with both default and custom remote ports.
>
> OK for trunk?
>
> Sterling
>
> testsuite/ChangeLog
>
> 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.
Let's try that again with the patch actually attached.....
[-- Attachment #2: remote-stdio-gdbserver.patch --]
[-- Type: application/octet-stream, Size: 1678 bytes --]
Index: testsuite/boards/remote-stdio-gdbserver.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/boards/remote-stdio-gdbserver.exp,v
retrieving revision 1.1
diff -u -p -r1.1 remote-stdio-gdbserver.exp
--- testsuite/boards/remote-stdio-gdbserver.exp 21 May 2013 17:58:46 -0000 1.1
+++ testsuite/boards/remote-stdio-gdbserver.exp 29 Aug 2013 18:33:04 -0000
@@ -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
}
next prev parent reply other threads:[~2013-08-29 19:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-29 18:40 Sterling Augustine
2013-08-29 19:03 ` Sterling Augustine [this message]
2013-08-29 19:10 ` Doug Evans
2013-08-29 19:22 ` Sterling Augustine
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAEG7qUwVarou0=D=RxwWY5oXHUuf5kAOONV-5R1Uey8ZtnAPKg@mail.gmail.com' \
--to=saugustine@google.com \
--cc=dje@google.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox