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 --- .../Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp') diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp index 5641b22b707..3361ffaeea7 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp @@ -966,7 +966,7 @@ GDBRemoteCommunicationServerCommon::Handle_QEnvironmentHexEncoded (StringExtract { std::string str; packet.GetHexByteString(str); - m_process_launch_info.GetEnvironmentEntries().AppendArgument(str); + m_process_launch_info.GetEnvironmentEntries().AppendArgument(str.c_str()); return SendOKResponse(); } return SendErrorResponse(12); @@ -979,7 +979,8 @@ GDBRemoteCommunicationServerCommon::Handle_QLaunchArch (StringExtractorGDBRemote const uint32_t bytes_left = packet.GetBytesLeft(); if (bytes_left > 0) { - ArchSpec arch_spec(packet.Peek(), nullptr); + const char* arch_triple = packet.Peek(); + ArchSpec arch_spec(arch_triple,NULL); m_process_launch_info.SetArchitecture(arch_spec); return SendOKResponse(); } -- cgit v1.2.3