================
@@ -226,13 +227,24 @@ Status PlatformRemoteGDBServer::ConnectRemote(Args &args)
{
if (!url)
return Status::FromErrorString("URL is null.");
- std::optional<URI> parsed_url = URI::Parse(url);
- if (!parsed_url)
- return Status::FromErrorStringWithFormat("Invalid URL: %s", url);
+ // Parse the scheme manually because URI::parse does not handle Windows
paths.
+ llvm::StringRef scheme = llvm::StringRef(url).split("://").first;
+ std::optional<Socket::ProtocolModePair> protocol_and_mode =
+ Socket::GetProtocolAndMode(scheme);
+ if (protocol_and_mode &&
+ (protocol_and_mode->first == Socket::ProtocolUnixDomain ||
+ protocol_and_mode->first == Socket::ProtocolUnixAbstract)) {
+ m_platform_scheme = scheme.str();
+ m_platform_hostname = "";
----------------
Nerixyz wrote:
Oh right, it would be in the path part of the url. Can you add a comment above
that?
https://github.com/llvm/llvm-project/pull/206985
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits