llvm-project/lldb/unittests/Host
Michał Górny 14735cab65 [lldb] [gdb-remote] Add eOpenOptionReadWrite for future gdb compat
Modify OpenOptions enum to open the future path into synchronizing
vFile:open bits with GDB.  Currently, LLDB and GDB use different flag
models effectively making it impossible to match bits.  Notably, LLDB
uses two bits to indicate read and write status, and uses union of both
for read/write.  GDB uses a value of 0 for read-only, 1 for write-only
and 2 for read/write.

In order to future-proof the code for the GDB variant:

1. Add a distinct eOpenOptionReadWrite constant to be used instead
   of (eOpenOptionRead | eOpenOptionWrite) when R/W access is required.

2. Rename eOpenOptionRead and eOpenOptionWrite to eOpenOptionReadOnly
   and eOpenOptionWriteOnly respectively, to make it clear that they
   do not mean to be combined and require update to all call sites.

3. Use the intersection of all three flags when matching against
   the three possible values.

This commit does not change the actual bits used by LLDB.

Differential Revision: https://reviews.llvm.org/D106984
2021-08-09 12:06:59 +02:00
..
linux [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
CMakeLists.txt [lldb] Fix some bugs in the Pipe class and add tests 2021-01-10 21:59:16 +01:00
ConnectionFileDescriptorTest.cpp [lldb/unittests] Skip IPv6 test on systems which don't have IPv6 configured 2020-04-27 17:33:20 +02:00
FileActionTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
FileSystemTest.cpp [lldb] [gdb-remote] Add eOpenOptionReadWrite for future gdb compat 2021-08-09 12:06:59 +02:00
FileTest.cpp [lldb] [gdb-remote] Add eOpenOptionReadWrite for future gdb compat 2021-08-09 12:06:59 +02:00
HostInfoTest.cpp [lldb] Fix leak in test 2021-06-11 00:20:35 -07:00
HostTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
MainLoopTest.cpp [lldb][NFC] Fix unsigned/signed cmp warning in MainLoopTest 2021-04-22 12:20:32 +02:00
NativeProcessProtocolTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
PipeTest.cpp [lldb] Disable PipeTest.OpenAsReader on windows 2021-01-11 13:37:49 +01:00
ProcessLaunchInfoTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
SocketAddressTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
SocketTest.cpp Bump googletest to 1.10.0 2021-05-14 19:16:31 +02:00
SocketTestUtilities.cpp [lldb/ipv6] Support running lldb tests in an ipv6-only environment. 2020-09-30 11:08:41 -07:00
SocketTestUtilities.h [lldb/unittests] Skip IPv6 test on systems which don't have IPv6 configured 2020-04-27 17:33:20 +02:00