Index: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp =================================================================== --- source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp @@ -3233,8 +3233,7 @@ return UINT64_MAX; stream.PutCStringAsRawHex8(path.c_str()); stream.PutChar(','); - const uint32_t posix_open_flags = File::ConvertOpenOptionsForPOSIXOpen(flags); - stream.PutHex32(posix_open_flags); + stream.PutHex32(flags); stream.PutChar(','); stream.PutHex32(mode); const char* packet = stream.GetData(); Index: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp =================================================================== --- source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp +++ source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp @@ -567,7 +567,8 @@ { if (packet.GetChar() == ',') { - uint32_t flags = packet.GetHexMaxU32(false, 0); + uint32_t flags = File::ConvertOpenOptionsForPOSIXOpen( + packet.GetHexMaxU32(false, 0)); if (packet.GetChar() == ',') { mode_t mode = packet.GetHexMaxU32(false, 0600);