[Lldb-commits] [lldb] r154515 - in /lldb/branches/lldb-platform-work/source/Plugins/Platform: MacOSX/PlatformDarwin.cpp POSIX/PlatformPOSIX.cpp
Enrico Granata
egranata at apple.com
Wed Apr 11 11:02:20 PDT 2012
Author: enrico
Date: Wed Apr 11 13:02:20 2012
New Revision: 154515
URL: http://llvm.org/viewvc/llvm-project?rev=154515&view=rev
Log:
Adding in SSH support to run shell commands on the remote host over a secure connection - Ability to fetch stdout from the remote process is still missing
Modified:
lldb/branches/lldb-platform-work/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
lldb/branches/lldb-platform-work/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
Modified: lldb/branches/lldb-platform-work/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp?rev=154515&r1=154514&r2=154515&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp (original)
+++ lldb/branches/lldb-platform-work/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp Wed Apr 11 13:02:20 2012
@@ -406,6 +406,11 @@
SetSupportsRSync(true);
SetRSyncArgs(posix_options->m_rsync_args.c_str());
}
+ if (posix_options->m_ssh)
+ {
+ SetSupportsSSH(true);
+ SetSSHArgs(posix_options->m_ssh_args.c_str());
+ }
}
}
Modified: lldb/branches/lldb-platform-work/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp?rev=154515&r1=154514&r2=154515&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp (original)
+++ lldb/branches/lldb-platform-work/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp Wed Apr 11 13:02:20 2012
@@ -69,6 +69,14 @@
m_rsync_args.assign(option_arg);
break;
+ case 's':
+ m_ssh = true;
+ break;
+
+ case 'S':
+ m_ssh_args.assign(option_arg);
+ break;
+
default:
error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
@@ -121,8 +129,9 @@
{
// run the command over SSH
StreamString command;
- command.Printf("ssh %s %s",
+ command.Printf("ssh %s %s %s",
GetSSHArgs(),
+ GetHostname(),
command_line.c_str());
return m_remote_platform_sp->RunShellCommand(command.GetData());
}
More information about the lldb-commits
mailing list