diff options
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote')
3 files changed, 12 insertions, 12 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp index 40279fe8584..555ae461b1c 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); 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(); } diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp index 44566c81267..81c54edd388 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp @@ -1186,7 +1186,7 @@ GDBRemoteCommunicationServerLLGS::Handle_C (StringExtractorGDBRemote &packet) if (packet.GetBytesLeft () > 0) { // FIXME add continue at address support for $C{signo}[;{continue-address}]. - if (packet.PeekChar() == ';') + if (*packet.Peek () == ';') return SendUnimplementedResponse (packet.GetStringRef().c_str()); else return SendIllFormedResponse (packet, "unexpected content after $C{signal-number}"); @@ -1257,8 +1257,7 @@ GDBRemoteCommunicationServerLLGS::Handle_c (StringExtractorGDBRemote &packet) if (has_continue_address) { if (log) - log->Printf("GDBRemoteCommunicationServerLLGS::%s not implemented for c{address} variant [%s remains]", - __FUNCTION__, packet.Peek().str().c_str()); + log->Printf ("GDBRemoteCommunicationServerLLGS::%s not implemented for c{address} variant [%s remains]", __FUNCTION__, packet.Peek ()); return SendUnimplementedResponse (packet.GetStringRef().c_str()); } @@ -1319,13 +1318,13 @@ GDBRemoteCommunicationServerLLGS::Handle_vCont (StringExtractorGDBRemote &packet } // Check if this is all continue (no options or ";c"). - if (packet.Peek() == ";c") + if (::strcmp (packet.Peek (), ";c") == 0) { // Move past the ';', then do a simple 'c'. packet.SetFilePos (packet.GetFilePos () + 1); return Handle_c (packet); } - else if (packet.Peek() == ";s") + else if (::strcmp (packet.Peek (), ";s") == 0) { // Move past the ';', then do a simple 's'. packet.SetFilePos (packet.GetFilePos () + 1); @@ -1342,7 +1341,7 @@ GDBRemoteCommunicationServerLLGS::Handle_vCont (StringExtractorGDBRemote &packet ResumeActionList thread_actions; - while (packet.GetBytesLeft() && packet.PeekChar() == ';') + while (packet.GetBytesLeft () && *packet.Peek () == ';') { // Skip the semi-colon. packet.GetChar (); @@ -1384,7 +1383,7 @@ GDBRemoteCommunicationServerLLGS::Handle_vCont (StringExtractorGDBRemote &packet } // Parse out optional :{thread-id} value. - if (packet.GetBytesLeft() && packet.PeekChar() == ':') + if (packet.GetBytesLeft () && (*packet.Peek () == ':')) { // Consume the separator. packet.GetChar (); @@ -2927,7 +2926,7 @@ GDBRemoteCommunicationServerLLGS::GetThreadFromSuffix (StringExtractorGDBRemote return thread_sp; // Parse out thread: portion. - if (packet.Peek().startswith("thread:")) + if (strncmp (packet.Peek (), "thread:", strlen("thread:")) != 0) { if (log) log->Printf ("GDBRemoteCommunicationServerLLGS::%s gdb-remote parse error: expected 'thread:' but not found, packet contents = '%s'", __FUNCTION__, packet.GetStringRef ().c_str ()); |