rgiese updated this revision to Diff 365186.
rgiese added a comment.
Incorporating feedback.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107767/new/
https://reviews.llvm.org/D107767
Files:
lldb/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm
Index:
lldb/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm
===================================================================
---
lldb/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm
+++
lldb/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm
@@ -425,10 +425,12 @@
open(file_spec.GetPath().c_str(), oflag, S_IRUSR | S_IWUSR);
if (created_fd >= 0) {
auto file_options = File::OpenOptions(0);
- if ((oflag & O_RDWR) || (oflag & O_RDONLY))
- file_options |= File::eOpenOptionReadOnly;
- if ((oflag & O_RDWR) || (oflag & O_RDONLY))
+ if (oflag & O_RDWR)
+ file_options |= File::eOpenOptionReadWrite;
+ else if (oflag & O_WRONLY)
file_options |= File::eOpenOptionWriteOnly;
+ else if (oflag & O_RDONLY)
+ file_options |= File::eOpenOptionReadOnly;
file = std::make_shared<NativeFile>(created_fd, file_options, true);
[options setValue:[NSNumber numberWithInteger:created_fd]
forKey:key];
return error; // Success
Index: lldb/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm
===================================================================
--- lldb/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm
+++ lldb/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm
@@ -425,10 +425,12 @@
open(file_spec.GetPath().c_str(), oflag, S_IRUSR | S_IWUSR);
if (created_fd >= 0) {
auto file_options = File::OpenOptions(0);
- if ((oflag & O_RDWR) || (oflag & O_RDONLY))
- file_options |= File::eOpenOptionReadOnly;
- if ((oflag & O_RDWR) || (oflag & O_RDONLY))
+ if (oflag & O_RDWR)
+ file_options |= File::eOpenOptionReadWrite;
+ else if (oflag & O_WRONLY)
file_options |= File::eOpenOptionWriteOnly;
+ else if (oflag & O_RDONLY)
+ file_options |= File::eOpenOptionReadOnly;
file = std::make_shared<NativeFile>(created_fd, file_options, true);
[options setValue:[NSNumber numberWithInteger:created_fd] forKey:key];
return error; // Success
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits