llvm-project/lldb/source/Plugins/LanguageRuntime
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
..
CPlusPlus [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
ObjC [lldb] Move Objective-C constants into ObjCConstants.h 2021-08-07 16:04:52 -07:00
RenderScript [lldb] [gdb-remote] Add eOpenOptionReadWrite for future gdb compat 2021-08-09 12:06:59 +02:00
CMakeLists.txt Remove Java debugger plugin 2018-11-05 19:34:02 +00:00