summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Platform
diff options
context:
space:
mode:
authorOleksiy Vyalov <ovyalov@google.com>2015-10-22 19:17:32 +0000
committerOleksiy Vyalov <ovyalov@google.com>2015-10-22 19:17:32 +0000
commit92b14b9f71f6778370bfda6fffe586d2c63cc0dc (patch)
tree5e8cb50b1a1727d986ce760e03b2f81521ffa4e1 /lldb/source/Plugins/Platform
parentc4aaed925539e53631503273b329440f7ab6d21d (diff)
downloadbcm5719-llvm-92b14b9f71f6778370bfda6fffe586d2c63cc0dc.tar.gz
bcm5719-llvm-92b14b9f71f6778370bfda6fffe586d2c63cc0dc.zip
Set device_id to host value only in case of adb protocol.
llvm-svn: 251044
Diffstat (limited to 'lldb/source/Plugins/Platform')
-rw-r--r--lldb/source/Plugins/Platform/Android/PlatformAndroid.cpp3
-rw-r--r--lldb/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Platform/Android/PlatformAndroid.cpp b/lldb/source/Plugins/Platform/Android/PlatformAndroid.cpp
index 0706c9bafa8..403e641952c 100644
--- a/lldb/source/Plugins/Platform/Android/PlatformAndroid.cpp
+++ b/lldb/source/Plugins/Platform/Android/PlatformAndroid.cpp
@@ -196,7 +196,8 @@ PlatformAndroid::ConnectRemote(Args& args)
return Error("URL is null.");
if (!UriParser::Parse(url, scheme, host, port, path))
return Error("Invalid URL: %s", url);
- m_device_id = host;
+ if (scheme == "adb")
+ m_device_id = host;
auto error = PlatformLinux::ConnectRemote(args);
if (error.Success())
diff --git a/lldb/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp b/lldb/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp
index 1abc708cb83..01b0ffa96d3 100644
--- a/lldb/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp
+++ b/lldb/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp
@@ -126,7 +126,8 @@ PlatformAndroidRemoteGDBServer::ConnectRemote (Args& args)
return Error("URL is null.");
if (!UriParser::Parse (url, scheme, host, remote_port, path))
return Error("Invalid URL: %s", url);
- m_device_id = host;
+ if (scheme == "adb")
+ m_device_id = host;
std::string connect_url;
auto error = MakeConnectURL (g_remote_platform_pid,
OpenPOWER on IntegriCloud