diff options
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp index 25911ac65cb..edf38cf0faa 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp @@ -846,10 +846,11 @@ GDBRemoteCommunicationServerCommon::Handle_qPlatform_mkdir (StringExtractorGDBRe std::string path; packet.GetHexByteString(path); Error error = FileSystem::MakeDirectory(path.c_str(), mode); - if (error.Success()) - return SendPacketNoLock ("OK", 2); - else - return SendErrorResponse(error.GetError()); + + StreamGDBRemote response; + response.Printf("F%u", error.GetError()); + + return SendPacketNoLock(response.GetData(), response.GetSize()); } return SendErrorResponse(20); } @@ -865,10 +866,11 @@ GDBRemoteCommunicationServerCommon::Handle_qPlatform_chmod (StringExtractorGDBRe std::string path; packet.GetHexByteString(path); Error error = FileSystem::SetFilePermissions(path.c_str(), mode); - if (error.Success()) - return SendPacketNoLock ("OK", 2); - else - return SendErrorResponse(error.GetError()); + + StreamGDBRemote response; + response.Printf("F%u", error.GetError()); + + return SendPacketNoLock(response.GetData(), response.GetSize()); } return SendErrorResponse(19); } |