A while back in revison 244716 we added support for getting the host OS version info from debugserver. We added keys to "qHostInfo" that were "osmajor", "osminor" and "ospatch", but no one ever parsed those, so I am removing them from debugserver. We accidentally also added a "version" key to qHostInfo instead of "os_version". So now we need to support both "version" and "os_version" in qHostInfo since we have debugserver binaries out in the wild that support this old packet type. I have updated debugserver ot use the correct "os_version" for future compatability or correctness.

<rdar://problem/24378699> 

llvm-svn: 259003
This commit is contained in:
Greg Clayton 2016-01-28 00:16:11 +00:00
parent 03c03f57ee
commit 17499dde46
2 changed files with 4 additions and 9 deletions

View File

@ -2064,7 +2064,8 @@ GDBRemoteCommunicationClient::GetHostInfo (bool force)
if (pointer_byte_size != 0)
++num_keys_decoded;
}
else if (name.compare("os_version") == 0)
else if ((name.compare("os_version") == 0) ||
(name.compare("version") == 0)) // Older debugserver binaries used the "version" key instead of "os_version"...
{
Args::StringToVersion (value.c_str(),
m_os_version_major,

View File

@ -4645,15 +4645,9 @@ RNBRemote::HandlePacket_qHostInfo (const char *p)
uint64_t major, minor, patch;
if (DNBGetOSVersionNumbers (&major, &minor, &patch))
{
strm << "osmajor:" << major << ";";
strm << "osminor:" << minor << ";";
strm << "ospatch:" << patch << ";";
strm << "version:" << major << "." << minor;
if (patch != 0)
{
strm << "os_version:" << major << "." << minor;
if (patch != UINT64_MAX)
strm << "." << patch;
}
strm << ";";
}