[Lldb-commits] [lldb] r259003 - 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...
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Wed Jan 27 16:16:11 PST 2016
Author: gclayton
Date: Wed Jan 27 18:16:11 2016
New Revision: 259003
URL: http://llvm.org/viewvc/llvm-project?rev=259003&view=rev
Log:
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>
Modified:
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
lldb/trunk/tools/debugserver/source/RNBRemote.cpp
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp?rev=259003&r1=259002&r2=259003&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp Wed Jan 27 18:16:11 2016
@@ -2064,7 +2064,8 @@ GDBRemoteCommunicationClient::GetHostInf
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,
Modified: lldb/trunk/tools/debugserver/source/RNBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/RNBRemote.cpp?rev=259003&r1=259002&r2=259003&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/RNBRemote.cpp (original)
+++ lldb/trunk/tools/debugserver/source/RNBRemote.cpp Wed Jan 27 18:16:11 2016
@@ -4645,15 +4645,9 @@ RNBRemote::HandlePacket_qHostInfo (const
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 << ";";
}
More information about the lldb-commits
mailing list