[Lldb-commits] [PATCH] D14101: Treat hostname in android URL as device id unless it matches "localhost"
Oleksiy Vyalov via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 26 19:04:36 PDT 2015
ovyalov created this revision.
ovyalov added reviewers: tberghammer, labath.
ovyalov added a subscriber: lldb-commits.
Herald added subscribers: danalbert, tberghammer.
We can connect to a device using various protocols (tcp, unix domain, abstract).
Instead of adding new URL schemes (e.g., adb-unix, adb-abstract) to cover alternative transport we can use standard connect URLs together with device id as hostname, unless it matches "localhost".
If hostname is "localhost" then we expect a single connected device.
http://reviews.llvm.org/D14101
Files:
source/Plugins/Platform/Android/PlatformAndroid.cpp
source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp
Index: source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp
===================================================================
--- source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp
+++ source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp
@@ -126,7 +126,7 @@
return Error("URL is null.");
if (!UriParser::Parse (url, scheme, host, remote_port, path))
return Error("Invalid URL: %s", url);
- if (scheme == "adb")
+ if (host != "localhost")
m_device_id = host;
std::string connect_url;
Index: source/Plugins/Platform/Android/PlatformAndroid.cpp
===================================================================
--- source/Plugins/Platform/Android/PlatformAndroid.cpp
+++ source/Plugins/Platform/Android/PlatformAndroid.cpp
@@ -196,7 +196,7 @@
return Error("URL is null.");
if (!UriParser::Parse(url, scheme, host, port, path))
return Error("Invalid URL: %s", url);
- if (scheme == "adb")
+ if (host != "localhost")
m_device_id = host;
auto error = PlatformLinux::ConnectRemote(args);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14101.38490.patch
Type: text/x-patch
Size: 1119 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20151027/bfa246b1/attachment-0001.bin>
More information about the lldb-commits
mailing list