diff options
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
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 ()); |