diff --git a/lldb/source/Commands/CommandObjectPlatform.cpp b/lldb/source/Commands/CommandObjectPlatform.cpp --- a/lldb/source/Commands/CommandObjectPlatform.cpp +++ b/lldb/source/Commands/CommandObjectPlatform.cpp @@ -498,8 +498,7 @@ lldb::eFilePermissionsWorldRead; lldb::user_id_t fd = platform_sp->OpenFile( FileSpec(cmd_line), - File::eOpenOptionReadWrite | File::eOpenOptionAppend | - File::eOpenOptionCanCreate, + File::eOpenOptionReadWrite | File::eOpenOptionCanCreate, perms, error); if (error.Success()) { result.AppendMessageWithFormat("File Descriptor = %" PRIu64 "\n", fd); diff --git a/lldb/test/API/functionalities/gdb_remote_client/TestGDBRemotePlatformFile.py b/lldb/test/API/functionalities/gdb_remote_client/TestGDBRemotePlatformFile.py --- a/lldb/test/API/functionalities/gdb_remote_client/TestGDBRemotePlatformFile.py +++ b/lldb/test/API/functionalities/gdb_remote_client/TestGDBRemotePlatformFile.py @@ -34,7 +34,7 @@ self.match("platform file close 16", [r"file 16 closed."]) self.assertPacketLogContains([ - "vFile:open:2f736f6d652f66696c652e747874,0000020a,000001ed", + "vFile:open:2f736f6d652f66696c652e747874,00000202,000001ed", "vFile:pread:10,d,b", "vFile:pwrite:10,b,teststring", "vFile:close:10", @@ -70,7 +70,7 @@ [r"error: Invalid argument"], error=True) self.assertPacketLogContains([ - "vFile:open:2f736f6d652f66696c652e747874,0000020a,000001ed", + "vFile:open:2f736f6d652f66696c652e747874,00000202,000001ed", "vFile:pread:10,d,b", "vFile:pwrite:10,b,teststring", "vFile:close:10",