aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2016-08-31 08:43:37 +0000
committerPavel Labath <labath@google.com>2016-08-31 08:43:37 +0000
commitb9739d4090da7812e4a3ba2fccc357a76ee80bcb (patch)
tree5bc0712bb45db3a66d76b1f1aac45ff2e13de4a8 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
parentf21aade0d8d96417b4a7e25c7ddc300b0ea6d718 (diff)
downloadllvm-b9739d4090da7812e4a3ba2fccc357a76ee80bcb.zip
llvm-b9739d4090da7812e4a3ba2fccc357a76ee80bcb.tar.gz
llvm-b9739d4090da7812e4a3ba2fccc357a76ee80bcb.tar.bz2
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
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp4
1 files changed, 2 insertions, 2 deletions
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);