This patch gets remote-gdb-server platform able to run processes on a remote system
- Make sure the selected platform is always used
- Make sure that the host uses the connect://hostname to connect to both the lldb-platform and the lldb-gdbserver rather than what the platform reports as the hostname of the lldb-gdbserver
- Make sure that lldb-platform uses the IP address on it's connection back to the host instead of the hostname that the host sends to it when launching lldb-gdbserver with the remote host information
Details:
source/Commands/CommandObjectPlatform.cpp
added SetSelectedPlatform call, because this is what SB does
source/Commands/CommandObjectTarget.cpp
removed m_platform_options - why was it ever in target?
calling CreateTarget with the selected platform (remote-gdb-server) instead of using m_platform_options, which was creating and using a new "host" platform instead of whatever is selected
source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
implemented PlatformRemoteGDBServer::ResolveExecutable, mostly copied from iOS version
added primitive PlatformRemoteGDBServer::GetSupportedArchitectureAtIndex implementation
PlatformRemoteGDBServer::ConnectRemote - retaining hostname where lldb-platform is running so we can re-use it when we connect to the gdb server.
source/Target/Platform.cpp
implemented Platform::PutFile
source/Target/TargetList.cpp
make sure we're using a platform if one is selected
Do we need to check for error here?