From b9739d4090da7812e4a3ba2fccc357a76ee80bcb Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Wed, 31 Aug 2016 08:43:37 +0000 Subject: Revert r280137 and 280139 and subsequent build fixes The rewrite of StringExtractor::GetHexMaxU32 changes functionality in a way which makes lldb-server crash. The crash (assert) happens when parsing the "qRegisterInfo0" packet, because the function tries to drop_front more bytes than the packet contains. It's not clear to me whether we should consider this a bug in the caller or the callee, but it any case, it worked before, so I am reverting this until we can figure out what the proper interface should be. llvm-svn: 280207 --- .../Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp') diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp index 40279fe..555ae46 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp @@ -3240,7 +3240,7 @@ GDBRemoteCommunicationClient::ReadFile (lldb::user_id_t fd, uint32_t retcode = response.GetHexMaxU32(false, UINT32_MAX); if (retcode == UINT32_MAX) return retcode; - const char next = (response.GetBytesLeft() ? response.PeekChar() : 0); + const char next = (response.Peek() ? *response.Peek() : 0); if (next == ',') return 0; if (next == ';') @@ -3428,7 +3428,7 @@ GDBRemoteCommunicationClient::CalculateMD5 (const lldb_private::FileSpec& file_s return false; if (response.GetChar() != ',') return false; - if (response.GetBytesLeft() && response.PeekChar() == 'x') + if (response.Peek() && *response.Peek() == 'x') return false; low = response.GetHexMaxU64(false, UINT64_MAX); high = response.GetHexMaxU64(false, UINT64_MAX); -- cgit v1.1